picture quality of the figures

Try changing the resolution to a value of 300 or 600 dpi. This should give you very high quality figures when using the Agg backend. The standard is 80 which is ok for screen display but for printing purposes you should use a higher value. See http://matplotlib.sourceforge.net/matplotlib.pylab.html#-figure (dpi keyword argument).

···

----- Original Message -----

From:
Vedpathak, Rameshwari IN BLR SISL

To: matplotlib-users@…431…ists.sourceforge.net

Sent: Monday, October 03, 2005 2:38 PM

Subject: [Matplotlib-users] picture quality of the figures

Hello,

We are using matplotlib version 0.8 (matplotlib-0.80.win32-py2.2.exe).

The plots are saved as .png, but we feel the quality of this picture is not so good. (not good resolution supported).

Is there anyway by which we can improve the picture quality? Say like by using .jpeg.

We tried to save the plot as .jpeg as mentioned on the site (http://matplotlib.sourceforge.net/matplotlib.pylab.html#-savefig ) , but we get error __ “IOError: Do not know know to handle extension *.jpeg…”__

Does it mean that matplotlib 0.8 does not support jpeg format?

If anyone has an idea about this then please do let us know.

Thanks in advance

Best Regards,

Rameshwari

Sascha wrote:

Try changing the resolution to a value of 300 or 600 dpi. This should
give you very high quality figures when using the Agg backend. The
standard is 80 which is ok for screen display but for printing
purposes you should use a higher value. See
http://matplotlib.sourceforge.net/matplotlib.pylab.html#-figure (dpi
keyword argument).

Except that savefig() overrides the Figure dpi, so you need to pass the desired dpi in to the savefig function (or method):

savefig(filename, dpi=300)

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...