[SciPy-user] scikits.timeseries : bottom of year cut off plot when saving

Pierre GM pgmdevlist at gmail.com
Mon Dec 22 15:06:39 EST 2008


Dharhas,
Try to adjust the position of the axes with fig.subplots_adjust



On Dec 22, 2008, at 2:43 PM, Dharhas Pothina wrote:

> Hi,
>
> This is probably a simple fix but I'm not sure how to do it. If you  
> look at the attached figure, the bottom few pixels of '2003' are cut  
> off when using savefig to save the figure as a png.
>
> My code is below :
>
>       fig = tpl.tsfigure()
>       fsp = fig.add_tsplot(111)
>       fsp.tsplot(baseAS[:,i,0,0].convert(freq=freq,func=np.mean),  
> 'r',label='No Siphons')
>       fsp.tsplot(SL_AS03_142[:,i, 
> 0,0].convert(freq=freq,func=np.mean), 'b',label='Star Lake Siphon')
>       fsp.tsplot(WL_AS03_142[:,i, 
> 0,0].convert(freq=freq,func=np.mean), 'g',label='Willow Lake Siphon')
>       fsp.tsplot(CS_AS03_142[:,i, 
> 0,0].convert(freq=freq,func=np.mean), 'c',label='Control Structure  
> Siphon')
>       fsp.set_ylim(0,35)
>       fsp.grid()
>       fsp.set_title(site + ': Siphon Flow = 1.42 m^3/s')
>       fsp.set_ylabel('Salinity (ppt)')
>       py.legend()
>       plotname = 'plots/' + site + '_AS03_Salinity_Scenarios_Const142'
>       py.savefig(plotname + '_freq-' + freq +  
> '.png',dpi=300,format='png')
>
> - dharhas
>
> Dharhas Pothina
> Hydrologist, Bays & Estuaries Section
> Surface Water Resources Division
> Texas Water Development Board
> 1700 North Congress Ave.
> P.O. Box 13231
> Austin, TX 78711-3231
>
> Tel: (512) 936-0818
> Fax: (512) 936-0816
>
> dharhas.pothina at twdb.state.tx.us
> www.twdb.state.tx.us
>
> <test.gif>_______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list