how to make a bar plot with xaxis datatime vals?

i 'm using the way

X = load(data1.dat)
datalen = X[:, 1]
times = X[:, 0]

times is UNIX_TIMESTAMP of datetime.

data1.dat file like this:

1158224731 1858
1158225026 1926
1158225328 1959
1158225627 2017
1158225931 2020
1158226229 2103
1158226534 2098

the end of the polt like this

datalen>

···
   >

   >

   >

   >

    ------------------------------------

    times  

how to make this plot using bar? any help will be great thank you !


Invite your mail contacts to join your friends list with Windows Live Spaces. It’s easy! Try it!

You may have to convert each Unix time value of "times" to
datetime.datetime ( Some info here :
http://pleac.sourceforge.net/pleac_python/datesandtimes.html )

And then do :
times = pylab.date2num( times )
to convert dates into matplotlib's date plotting format.

···

On Thu, Aug 28, 2008 at 12:15 AM, andy yu <ycomeba@...32...> wrote:

i 'm using the way

X = load(data1.dat)
datalen = X[:, 1]
times = X[:, 0]

times is UNIX_TIMESTAMP of datetime.

data1.dat file like this:

1158224731 1858
1158225026 1926
1158225328 1959
1158225627 2017
1158225931 2020
1158226229 2103
1158226534 2098

the end of the polt like this

datalen>
       >
       >
       >
       >
        ------------------------------------
        times

how to make this plot using bar? any help will be great thank you !