Menu

[r1233]: / trunk / toolkits / basemap / examples / ireland.py  Maximize  Restore  History

Download this file

56 lines (52 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from matplotlib.toolkits.basemap import Basemap
from pylab import *
# create Basemap instance. Use 'crude' resolution coastlines.
m = Basemap(-11.,51.,-5.,56.,
resolution='c',area_thresh=1000.,projection='cyl')
# create figure with same aspect ratio as map.
xsize = rcParams['figure.figsize'][0]
fig=figure(figsize=(xsize,m.aspect*xsize))
fig.add_axes([0.1,0.1,0.8,0.8])
# draw coastlines and fill continents.
m.drawcoastlines()
m.fillcontinents()
# draw parallels
circles = arange(50,60,1).tolist()
m.drawparallels(circles,labels=[1,1,1,1])
# draw meridians
meridians = arange(-12,0,1)
m.drawmeridians(meridians,labels=[1,1,1,1])
title("Crude Res Coastlines ('c')",y=1.075)
show()
# create Basemap instance. Use 'low' resolution coastlines.
m = Basemap(-11.,51.,-5.,56.,
resolution='l',area_thresh=1000.,projection='cyl')
# create figure with same aspect ratio as map.
xsize = rcParams['figure.figsize'][0]
fig=figure(figsize=(xsize,m.aspect*xsize))
fig.add_axes([0.1,0.1,0.8,0.8])
# draw coastlines and fill continents.
m.drawcoastlines()
m.fillcontinents()
# draw parallels
m.drawparallels(circles,labels=[1,1,1,1])
# draw meridians
m.drawmeridians(meridians,labels=[1,1,1,1])
title("Low Res Coastlines ('l')",y=1.075)
show()
# create Basemap instance. Use 'intermediate' resolution coastlines.
m = Basemap(-11.,51.,-5.,56.,
resolution='i',area_thresh=1000.,projection='cyl')
# create figure with same aspect ratio as map.
xsize = rcParams['figure.figsize'][0]
fig=figure(figsize=(xsize,m.aspect*xsize))
fig.add_axes([0.1,0.1,0.8,0.8])
# draw coastlines and fill continents.
m.drawcoastlines()
m.fillcontinents()
# draw parallels
m.drawparallels(circles,labels=[1,1,1,1])
# draw meridians
m.drawmeridians(meridians,labels=[1,1,1,1])
title("Intermediate Res Coastlines ('i')",y=1.075)
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.