postscript and basemap resolution

Hello!
I have a problem writing postscript output from a high resolution map. It does not give any error, but output file gives a lot of errors while I open it with gv. The following example works for basemap resolution 'i', but not with resolution 'f'. Any ideas what I should do in a different way or are there known limitations in PS or a bug?

Andres

#!/usr/bin/env python import numpy as np
import matplotlib
matplotlib.use( 'PS' )
from mpl_toolkits.basemap import Basemap
import os
import matplotlib.pyplot
import pylab as plt
import matplotlib.colors as colors
fig=plt.figure()
m=Basemap(llcrnrlon=0.83513989,llcrnrlat=53.49684419,urcrnrlon=55.00709304,urcr\
nrlat=64.88386147,
        projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i'

···

# ,area_thresh=100. )
m.drawcoastlines()
m.drawcountries()
m.drawmapboundary()
m.drawparallels([40,50,60,70],labels=[1,0,0,1])
m.drawmeridians([-160,-140,-120,-100,-80,-60,-40,-20,0,20,40,60,80,100,120,140,\
160,180],labels=[0,1,0,1])
plt.savefig('surfgeopot.eps')

Andres Luhamaa wrote:

Hello!
I have a problem writing postscript output from a high resolution map. It does not give any error, but output file gives a lot of errors while I open it with gv. The following example works for basemap resolution 'i', but not with resolution 'f'. Any ideas what I should do in a different way or are there known limitations in PS or a bug?

Andres
  
Andres: Works for me (using SVN trunk), so the bug in the ps backend must have been fixed since the last release.

-Jeff

···

#!/usr/bin/env python import numpy as np
import matplotlib
matplotlib.use( 'PS' )
from mpl_toolkits.basemap import Basemap
import os
import matplotlib.pyplot
import pylab as plt
import matplotlib.colors as colors
fig=plt.figure()
m=Basemap(llcrnrlon=0.83513989,llcrnrlat=53.49684419,urcrnrlon=55.00709304,urcr\
nrlat=64.88386147,
        projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i'
# ,area_thresh=100. )
m.drawcoastlines()
m.drawcountries()
m.drawmapboundary()
m.drawparallels([40,50,60,70],labels=[1,0,0,1])
m.drawmeridians([-160,-140,-120,-100,-80,-60,-40,-20,0,20,40,60,80,100,120,140,\
160,180],labels=[0,1,0,1])
plt.savefig('surfgeopot.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

Thanks Jeff, seems better indeed with svn version, at least resolution 'h' works (cant test the f resolution on a laptop). But when I zoom the image 4x, then gv starts giving errors again. At the same time, evince can show at the same zoom level.

Andres

Jeff Whitaker wrote:

···

Andres Luhamaa wrote:

Hello!
I have a problem writing postscript output from a high resolution map. It does not give any error, but output file gives a lot of errors while I open it with gv. The following example works for basemap resolution 'i', but not with resolution 'f'. Any ideas what I should do in a different way or are there known limitations in PS or a bug?

Andres
  
Andres: Works for me (using SVN trunk), so the bug in the ps backend must have been fixed since the last release.

-Jeff

#!/usr/bin/env python import numpy as np
import matplotlib
matplotlib.use( 'PS' )
from mpl_toolkits.basemap import Basemap
import os
import matplotlib.pyplot
import pylab as plt
import matplotlib.colors as colors
fig=plt.figure()
m=Basemap(llcrnrlon=0.83513989,llcrnrlat=53.49684419,urcrnrlon=55.00709304,urcr\

nrlat=64.88386147,
        projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i'
# ,area_thresh=100. )
m.drawcoastlines()
m.drawcountries()
m.drawmapboundary()
m.drawparallels([40,50,60,70],labels=[1,0,0,1])
m.drawmeridians([-160,-140,-120,-100,-80,-60,-40,-20,0,20,40,60,80,100,120,140,\

160,180],labels=[0,1,0,1])
plt.savefig('surfgeopot.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