Skip to content

Commit b1b47e4

Browse files
author
Jeff Whitaker
committed
add hammer example to test for issue 100
1 parent cb106bf commit b1b47e4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/warpimage.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@
3434
plt.title("Blue Marble image warped from 'cyl' to 'mbtfpq' projection",fontsize=12)
3535
print('warp to McBryde-Thomas Flat-Polar Quartic map ...')
3636

37+
# create new figure
38+
fig=plt.figure()
39+
# define projection centered on North America.
40+
m = Basemap(projection='hammer',lon_0=-100,resolution='l')
41+
m.bluemarble(scale=0.5)
42+
# draw coastlines.
43+
m.drawcoastlines(linewidth=0.5,color='0.5')
44+
# draw lat/lon grid lines every 30 degrees.
45+
m.drawmeridians(np.arange(0,360,60),color='0.5')
46+
m.drawparallels(np.arange(-90,90,30),color='0.5')
47+
plt.title("Blue Marble image warped from 'cyl' to 'hammer' projection",fontsize=12)
48+
print('warp to Hammer map ...')
49+
3750
# create new figure
3851
fig=plt.figure()
3952
# define cylindrical equidistant projection.

0 commit comments

Comments
 (0)