Skip to content

Commit 2a242e0

Browse files
author
Jeff Whitaker
committed
add projection='rotpole' example
1 parent 1549c4d commit 2a242e0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,22 @@
369369
print('plotting Square Lambert Azimuthal example ...')
370370
print(m.proj4string)
371371

372+
# create new figure
373+
fig=plt.figure()
374+
m = Basemap(projection = 'rotpole',lon_0 = -120.,\
375+
o_lon_p = 180, o_lat_p = 0,\
376+
llcrnry = -41.75, urcrnry = 37.75,\
377+
llcrnrx = 137, urcrnrx = 222.5, resolution = 'l')
378+
m.drawcoastlines()
379+
ny,nx = lons.shape
380+
m.contourf(lons[ny/2:,:],lats[ny/2:,:],topodat[ny/2:,:],50,cmap=cmap,extend='both',latlon=True)
381+
m.drawmeridians(np.arange(-180,180,20),labels=[1,1,1,1])
382+
m.drawparallels(np.arange(20,80,20))
383+
m.colorbar()
384+
plt.title('Rotated Pole',y=1.075)
385+
print('plotting Rotated Pole example ...')
386+
print(m.proj4string)
387+
372388
# create new figure
373389
fig=plt.figure()
374390
m = Basemap(lon_0=-105,boundinglat=20.,

0 commit comments

Comments
 (0)