On Tue, Jun 24, 2008 at 8:13 AM, Adam Mercer <[EMAIL PROTECTED]> wrote:
> What's strange is that if I comment out the plotting of the second > test data set then the plot is produced without error, even though the > reported error (when plotting both data sets) seems to have nothing to > do with the second data set. Hey Adam, 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() ------------------------------------------------------------------------- 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