Hello,
This weekend I started using matplotlib and I think it is great.
Beautiful graphs with very little effort.
My data is geographical so I would like to draw on a map, North-Sea (UK
- Netherlands). For this I installed the basemap on my Debian system
(Stable/Wheezy). This has a strange problem. If I zoom out, all is
there. If I start zooming in coastlines disappears. Is this my
mistake, a problem in the packages in Debian, or something else?
Thanks
The resulting image on my system:
http://img21.imageshack.us/img21/385/xoe7.png
My system:
Python 2.7.3 (default, Jan 2 2013, 16:53:07)
[GCC 4.7.2] on linux2
import matplotlib
matplotlib.__version__
'1.1.1rc2'
My code:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import matplotlib as mpl
mpl.rcParams['font.size'] = 8.
mpl.rcParams['font.family'] = 'Arial'
mpl.rcParams['axes.labelsize'] = 5.
mpl.rcParams['xtick.labelsize'] = 5.
mpl.rcParams['ytick.labelsize'] = 5.
#W-Europe
x1 = -16.
x2 = 30.
y1 = 36.
y2 = 62.
m = Basemap(resolution='i',projection='merc', llcrnrlat=y1,urcrnrlat=y2,llcrnrlon=x1,urcrnrlon=x2,lat_ts=(x1+x2)/2)
m.drawcountries(linewidth=0.5)
m.drawcoastlines(linewidth=0.5)
m.drawparallels(np.arange(y1,y2,2.),labels=[1,0,0,0],color='black',dashes=[1,0],labelstyle='+/-',linewidth=0.2)
m.drawmeridians(np.arange(x1,x2,2.),labels=[0,0,0,1],color='black',dashes=[1,0],labelstyle='+/-',linewidth=0.2)
plt.savefig('eur_101.png',dpi=100)
plt.show()