On Thursday 01 April 2010 09:41:06 yogesh karpate wrote:
> Dear All,
>                I have one .png image of 940X780 and i am plotting waveforms
> on it. When I save this plot as .png , matp[lotlib gives image in
> 800X600 that too with white space. I dont want to keep the white space and
> i want the same resolution as original image.How should I go ahead?
> Thanks in advance!!!
> Regards
> Yogesh

Hi Yogesh,

Doesn't the following example fulfill your needs (already posted to "How to 
save file in to image in desired resolution in matplotlib?")?

fig = plt.figure(figsize=(9.4, 7.8))
ax = plt.axes([0.0, 0.0, 1.0, 1.0]) # leaves no white space around the axes
ax.plot([1, 2, 4], lw=5)
ax.set_xticks([]) # removes ticks
ax.set_yticks([])

fig.savefig('test.png', dpi=100)

Kind regards,
Matthias

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to