The matplotlib-announce list is for announcements about releases of matplotlib and related projects only. Please ask user questions on matplotlib-users. (I have forwarded this message there).
There is a table of which output formats are supported by each backend here:
GtkAgg should be your best bet, but due to its reliance on Gtk, it can't be run on a headless server. If you need to run in such a mode (such as on a webserver), your best bet is probably to use Agg, save to png, and use PIL or ImageMagick etc. to convert afterward.
Emanuele Passera wrote:
I have always used .png format for my matplotlib applications but now i am compelled to save many figures in .jpeg format.
Those image should be automatically saved (no GUI) but i can't find out how to save the images.
Executing this scripts
import pylab as p
It gives me this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 345, in savefig
return fig.savefig(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 990, in savefig
File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1373, in print_figure
'%s.' % (format, ', '.join(formats)))
ValueError: Format "jpg" is not supported.
Supported formats: emf, eps, pdf, png, ps, raw, rgba, svg, svgz.
Can anyone help me ? (.jpeg extension it doesn't work too)
By the way, what is the best backend to fulfill the task ? (better quality and less memory leackage ?)
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA