the script used and data file are at:
http://neptuno.fis.ua.pt/tmp/comp.html

the script is very simple, just:

from numpy import savez,load, ma
import pylab
data = load('data.npz')
lon  = data['lon']
lat  = data['lat']
sst  = data['sst']
mask = data['mask']

sst=ma.masked_where(mask,sst)

pylab.pcolor(lon,lat,sst)
pylab.xlim([-12.5,-5.5])
pylab.ylim([34.5,45.5])
pylab.clim([12, 18])
pylab.savefig('filename.png')




The matplotlib version is:
In [2]: print matplotlib.__version__
0.98.3

The python version is:
In [5]: print sys.version
2.5.2 (r252:60911, Aug  1 2008, 00:37:21)
[GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]]

The machine is openSUSE 11.0 (X86-64):
 >>uname -a
Linux c5 2.6.25.18-0.2-default #1 SMP 2008-......

I tried in windows xp, latest enthought python (python 2.5.2; EPD Py25 
4.1.30101 (r252:60911, Dec 19 2008 ...)
and the output is similar (to linux python)
http://neptuno.fis.ua.pt/tmp/test_EPD.png


Thanks for the help
mma


John Hunter wrote:
> On Tue, Jan 13, 2009 at 12:16 PM, Martinho MA <m...@ua.pt> wrote:
>   
>> Hello,
>> I have a problem saving png files created from data with missing values.
>> The matlab and pylab outputs are very different... pylab resolution is
>> poorer !?
>>
>> the saving commands from matlab and python are similar:
>>
>> matlab:
>>  >>print -dpng -r80 test_matlab.png
>>
>> python:
>>  >>pylab.savefig('test_pylab.png',dpi=80)
>>
>>
>> look at the examples:
>> http://neptuno.fis.ua.pt/tmp/comp.html
>>
>> Can I get the pylab output with the quality of test_matlab.png?
>>     
>
>
> Without seeing any code or knowing anything about your matplotlib
> version -- it is hard to help.
>
>   
> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem
>
> JDH
>   


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to