Default dpi for savefig

Hi,

    > Hi, I'm a little bit lost with respect to setting the
    > resolution of images saved in png. The matplotlibrc file
    > sets the dpi to 80, but the default keyword argument of
    > savefig is set to 150. Thus, changing the rc setting to
    > dpi=300 does not modify savefig's default behaviour. Is
    > there a way to set a default dpi that would be used when
    > calling savefig ?

Have you tried modifying the rc setting

savefig.dpi : 100 # figure dots per inch

On a related issue: when exporting a figure from the tkagg backend (using the appropriate button) to PNG, the dpi is arbitrirarily set to 300 (see backend_tkagg.py in NavigationToolbar2TkAgg.save_figure):

self.canvas.print_figure(fname, dpi=300)

I think it should honor the savefig.dpi rc setting:

self.canvas.print_figure(fname, dpi=rcParams['savefig.dpi'])

so that using savefig('toto.png') in the script or exporting it from the window is equivalent. I dont't know if this happens w/ other 'GUI' backends.

Cheers.

···

--
             / \ , ,
   _._ _ |oo| _ / \__/ \
  _|||| ((/ () \)) / \ Yannick COPIN (o:>* Doctus cum libro
  >>>>>/| ( ==== ) |oo| Institut de physique nucleaire de Lyon
   \____/ _`\ /'_ / \ (IN2P3 - France)
   / /.-' /\<>/\ `\.( () )_._ Tel: (33/0) 472 431 968
   > ` / \/ \ /`'--'////) http://snovae.in2p3.fr/ycopin/
    \__,-'`| |. |\/ |/\/\|"\"` AIM: YcCopin ICQ: 236931013
       jgs | |. | \___/\___/
           > >. | | |