postscript bug?

Hello!
Following example will give strange result in postscript output. It does not happen, if I use imshow or contourf instead of pcolormesh and it seems to happen only with log scale.

Best regards,
Andres

import numpy as np
import matplotlib
matplotlib.use( 'PS' )
from mpl_toolkits.basemap import Basemap
import os
import pylab as plt
import matplotlib.colors as colors
m=Basemap(width=1500000,height=1000000,resolution='c',projection='stere',lon_0=\
17,lat_0=58)
# geogr coords for points rx=np.arange(18,22,0.1)
ry=np.arange(56,60,0.1)
RX,RY=np.meshgrid(rx,ry)
x,y=m(RX,RY)
# create data for points data=np.zeros([rx.size,ry.size])
data[:10,:10]=1e3
m.pcolormesh(x,y,data
             ,norm=colors.LogNorm(vmin=50,vmax=17000.0)
             )
m.drawcoastlines()
m.drawcountries()
m.drawmapboundary()
plt.colorbar()
plt.savefig('mapproblem.eps')

Images, one is directly png and other converted from eps.

Andres

Andres Luhamaa wrote:

problem_ps2png.png

···

Hello!
Following example will give strange result in postscript output. It does not happen, if I use imshow or contourf instead of pcolormesh and it seems to happen only with log scale.

Best regards,
Andres

import numpy as np
import matplotlib
matplotlib.use( 'PS' )
from mpl_toolkits.basemap import Basemap
import os
import pylab as plt
import matplotlib.colors as colors
m=Basemap(width=1500000,height=1000000,resolution='c',projection='stere',lon_0=\
17,lat_0=58)
# geogr coords for points rx=np.arange(18,22,0.1)
ry=np.arange(56,60,0.1)
RX,RY=np.meshgrid(rx,ry)
x,y=m(RX,RY)
# create data for points data=np.zeros([rx.size,ry.size])
data[:10,:10]=1e3
m.pcolormesh(x,y,data
             ,norm=colors.LogNorm(vmin=50,vmax=17000.0)
             )
m.drawcoastlines()
m.drawcountries()
m.drawmapboundary()
plt.colorbar()
plt.savefig('mapproblem.eps')

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options