Frank Breitling <fbreitl...@aip.de> writes: > I am using the GTKAgg backend which was the only one I found with > support for JPEG.
I think that backend inherits its support from the GTK backend, which uses GDK for saving JPEG files, and doesn't do anything with those options. I just realized that the Agg support depends on PIL. If you have that installed, this script should produce a really low-quality JPEG file: ---------------------------------------------------------------------- #!/usr/bin/env python import matplotlib matplotlib.use('agg') import pylab pylab.plot([3,1,4,1,5,9,2], lw=4) pylab.savefig('foo.jpeg', quality=1) ---------------------------------------------------------------------- > Although the options quality='95' and quality=1 didn't produce an error > they didn't have any effect either on a Ubuntu system. > Is there anything else I could try? If you do have PIL, you could use the non-interactive agg backend. If you do need to use an interactive backend that doesn't have support for these options, you could look at the implementation of FigureCanvasBase.print_jpg and replicate its functionality. > Besides, it would be very useful to find these options in the > documentation or the help if there is a situation in which they work. The options are documented, but it's not very easy to find them: http://matplotlib.sourceforge.net/api/backend_bases_api.html#matplotlib.backend_bases.FigureCanvasBase.print_jpeg -- Jouni K. Seppänen http://www.iki.fi/jks ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel