This is now added in SVN, and only for the Agg backend(s).  It won't 
work with some of the other ways to save PNG files, such as Gdk, Wx 
(non-Agg) and Cairo.  If anyone was any thoughts about how to support 
saving the resolution in those backends, please share.

Also note that resolution is saved in "dots per meter" in PNG files, so 
rounding error makes things slightly off -- for instance, 100 dpi is 
shows up as 99.999998 dpi in the GIMP.

Cheers,
Mike

Michael Droettboom wrote:
> I'll look into this.  I actually made a similar fix on another project I 
> used to work on...  It should be theoretically possible, barring any 
> roadblocks from how matplotlib is doing things.
> 
> Cheers,
> Mike
> 
> Wayne E. Harlan wrote:
>> I would like to follow up on my first response to Bill.  It probably 
>> should be a new thread, but I'll start here.  When png files are saved 
>> with a DPI=300 argument, and I open them in the Gimp, the dpi is only 72 
>> (default ?).  As I understand it, the dpi setting in the graphics file 
>> tells the application opening it how big to display it.  When I use 
>> savefig with a DPI=300 and the plot figure I am saving was created with 
>> figsize=(6,4.5) I expect the figure to open in word or swriter at the 
>> size I specified (6" by 4.5") with the appropriate number of pixels.  
>> However, at present, that does not happen.  The number of pixels in the 
>> figure is correct but I have to resize it manually to get the right 
>> size.  Can this be fixed ?
>>
>> Thanks,
>>
>> Wayne
>>
>> Bill Dandreta wrote:
>>> I resolved the problem. It was unrelated to mpl. xv and gimp were
>>> complied w/o png support. Recompiling with png support resolved the problem.
>>>
>>>   
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to