> I think I have this fixed in svn -- also, I rewrote your example to
> use csv2rec (which returns record arrays).  Thought you might be
> interested:
>
> import matplotlib.mlab as mlab
> import matplotlib.pyplot as plt
> import matplotlib.dates as mdates
> import matplotlib.cbook as cbook
> r1 = mlab.csv2rec('test1.dat', names='date,value', delimiter=' ',
>                  converterd={'date':cbook.todate('%Y%m%d')})
> r2 = mlab.csv2rec('test2.dat', names='date,value', delimiter=' ',
>                  converterd={'date':cbook.todate('%Y%m%d')})
>
> print 'dtype', r1.dtype
> fig = plt.figure()
> ax1 = fig.add_subplot(111)
> ax2 = ax1.twinx()
>
> # produce plot
> line1, = ax1.plot(r1.date, r1.value, 'bo-')
> line2,  = ax2.plot(r2.date, r2.value, 'bo-')
>
> # set up axes
> ax1.xaxis.set_major_locator(mdates.DayLocator(range(0, 31, 2)))
> ax1.xaxis.set_minor_locator(mdates.DayLocator(range(0, 31, 1)))
> ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d'))
>
> plt.show()

Thanks John, although the scale on the x-axis isn't shown using the
above example.

Cheers

Adam

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to