|
From: <js...@us...> - 2008-11-20 13:15:11
|
Revision: 6420
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6420&view=rev
Author: jswhit
Date: 2008-11-20 13:15:07 +0000 (Thu, 20 Nov 2008)
Log Message:
-----------
cosmetic fixes
Modified Paths:
--------------
trunk/toolkits/basemap/examples/save_background.py
Modified: trunk/toolkits/basemap/examples/save_background.py
===================================================================
--- trunk/toolkits/basemap/examples/save_background.py 2008-11-20 13:08:44 UTC (rev 6419)
+++ trunk/toolkits/basemap/examples/save_background.py 2008-11-20 13:15:07 UTC (rev 6420)
@@ -19,18 +19,19 @@
map.fillcontinents(color='coral',lake_color='aqua')
fig1.canvas.draw()
background = fig1.canvas.copy_from_bbox(fig1.bbox)
+# save figure 1.
fig1.savefig('figure1.png', dpi=100)
-
# generate the second figure, re-using the background
# from figure 1.
fig2 = plt.figure(2,frameon=False,**figprops)
-ax2 = fig2.add_subplot(111, frameon=False, xticks=[], yticks=[])
+ax2 = fig2.add_subplot(111,frameon=False)
# restore previous background.
fig2.canvas.restore_region(background)
# draw parallels and meridians on existing background.
map.drawparallels(range(-90,90,30))
map.drawmeridians(range(-180,180,60))
+# save figure 2.
fig2.savefig('figure2.png', dpi=100)
print 'images saved in figure1.png and figure2.png'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|