I think everyone else has given you enough pointers on increasing the resolution of your plots, I just thought I'd chime in w/ more info on JPEG.
JPEG is lossy compression format - it throws away information. PNG is a loss-less compression format - it does not throw away information. Since both formats start from the same raster image, you cannot increase your picture quality by changing formats, only by changing the original raster. In particular, JPEG is a terrible format for plots. It was designed to compress pictures and it cannot deal well with rapid changes in color in a image (like a black line on a white background).
Most JPEG compressed plots will show artifacts around all of the lines so instead of seeing the pixels (for a black line on a white background) like this:
white, white, white, black, white, white, white
In a JPEG image, you would see:
white, grey, grey, black, grey, grey, white
As others have already indicates, you can increase your DPI through various means or switch to PS (which uses vector based drawing commands instead of a set of pixels).
At 05:38 AM 10/3/2005, Vedpathak, Rameshwari IN BLR SISL wrote:
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>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
Ted Drain Jet Propulsion Laboratory ted.drain@...369...