[SciPy-User] timeseries plotting with two y axes

Solomon Negusse Solomon.Negusse@twdb.state.tx...
Tue Mar 15 14:46:45 CDT 2011


Hi, 
I'm trying to use timeseries.lib.plotlib to plot two timeseries with two y axes on a single plot.  I tried to use the twinx function the same way that I had done so with matplotlib's plot_date.    This is part of my code:
    fig = tpl.tsfigure()
    fsp = fig.add_tsplot(111)
    raw_salinity = fsp.tsplot(datasonde_series['Salinity'],'r.')
    fsp.set_ylim(0,100)
    fsp.set_dlim(sdate,edate)
    
    fsptemp = fsp.twinx()
    water_level = fsptemp.tsplot(datasonde_series['WaterDepth'],'b.')   
 
Doing this I get an error :  'Axes' object has no attribute tsplot.  
I'm kind of lost in how to fix this problem  and I'll appreciate any tips on how I can implement twinx correctly or if there is other way to do it within timeseries.lib.plotlib.
 
thanks,
-solomon  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110315/20ad8caa/attachment.html 


More information about the SciPy-User mailing list