On 02/07/2012 10:48 AM, Benjamin Root wrote:

On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont <lafont.fabien@gmail.com> wrote:
Is it possible to set the extension .pdf as defaut when I save an
image using the matplotlib bar. My coworkers are always saving the
image in png and it's really ugly!



Interesting request.  Looking through the backends, it appears that only the Cairo backend currently supports a configurable rcParam for the default filetype ('cairo.format').  All backends implement a "get_default_filetype()" method for their canvases, but most of them have that default hard-coded as "png".  This really only makes sense for backends like agg, pdf, ps and such.

Devs - Maybe we should consider fixing this for the non-fileformat specific backends?  Do we want an rcParam for each backend? Or a single rcParam for default filetypes and deprecate 'cairo.format'?

I would definitely lean toward the latter -- unify it under a single rcParam.