matplotlib/matplotlib — pull request #907 by mspacek (2012-05-28 23:51:20+00:00)
Title: replace cairo.format with savefig.format in rcParams, apply to most backends

I stumbled across this post on the mailing list a while ago about creating an rcParams field that controls the default savefig filetype:

http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg23382.html

It was suggested that cairo.format be deprecated and replaced with a single rcParam that applies to all (relevant) backends. So here's my stab at it. savefig.format is a new key that's loaded by the base backend, and only overridden in backends that didn't default to .png as their hardcoded format (specifically, the PS, PDF, SVG, and EMF backends). Seems pretty straightforward, but I've only really tested this on the Qt4Agg backend, because that's all I use.

I only did this because I wanted to change the default format from .png to .pdf in my matplotlibrc file, and now I can.

This also inadvertently replaced a few stray tabs with spaces in a couple of rc files.