SourceForge logo
SourceForge logo
Menu

SF.net SVN: matplotlib:[6038] trunk/toolkits/basemap

From: <js...@us...> - 2008年08月17日 22:18:00
Revision: 6038
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6038&view=rev
Author: jswhit
Date: 2008年08月17日 22:17:56 +0000 (2008年8月17日)
Log Message:
-----------
added cubed_sphere.py example
Modified Paths:
--------------
 trunk/toolkits/basemap/Changelog
 trunk/toolkits/basemap/MANIFEST.in
 trunk/toolkits/basemap/examples/README
Added Paths:
-----------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog	2008年08月16日 22:48:18 UTC (rev 6037)
+++ trunk/toolkits/basemap/Changelog	2008年08月17日 22:17:56 UTC (rev 6038)
@@ -1,4 +1,5 @@
 version 0.99.2 (not yet released)
+ * added cubed_sphere example.
 * updated NetCDFFile to use pupynere 1.0.2 (now can write as well
 as read!).
 * now works with geos version 3.
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in	2008年08月16日 22:48:18 UTC (rev 6037)
+++ trunk/toolkits/basemap/MANIFEST.in	2008年08月17日 22:17:56 UTC (rev 6038)
@@ -11,6 +11,7 @@
 include setup.cfg
 include setupegg.py
 include src/*
+include examples/cubed_sphere.py
 include examples/simpletest.py
 include examples/hires.py
 include examples/simpletest_oo.py
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README	2008年08月16日 22:48:18 UTC (rev 6037)
+++ trunk/toolkits/basemap/examples/README	2008年08月17日 22:17:56 UTC (rev 6038)
@@ -111,6 +111,9 @@
 plotprecip.py use nonlinear precip colormap included with basemap
 to make a rainfall plot.
 
+cubed_sphere.py - plot a "cubed globe" suitable for cutting and folding,
+a la http://www.progonos.com/furuti/MapProj/Normal/ProjPoly/Foldout/Cube/cube.html.
+
 run_all.py is a driver script that runs all the examples except fcstmaps.py,
 testgdal.py, geos_demo_2.py, warpimage.py, and pnganim.py (which
 rely on external dependencies and/or an internet connection).
Added: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	 (rev 0)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月17日 22:17:56 UTC (rev 6038)
@@ -0,0 +1,30 @@
+from mpl_toolkits.basemap import Basemap
+import matplotlib.pyplot as plt
+import numpy as np
+# 'cubed sphere'
+# inscribe the sphere in a cube, then separately project each cube
+# face with gnomonic projection.
+# http://www.progonos.com/furuti/MapProj/Normal/ProjPoly/Foldout/Cube/cube.html
+# suitable for cutting and folding.
+fig = plt.figure(figsize=(8,6))
+fig.subplots_adjust(bottom=0, left=0, right=1, top=1, wspace=0, hspace=0)
+rsphere = 6370997.
+width = 2.*rsphere; height=width
+npanel=0
+for lat_0 in [90,0,-90]:
+ for ncol in range(0,4):
+ npanel = npanel + 1
+ if lat_0 != 0 and ncol != 1: continue
+ ax=fig.add_subplot(3,4,npanel)
+ ax.set_frame_on(False)
+ lon_0=225 + 90*(ncol+1) - 45
+ m = Basemap(width=width,height=height,resolution=None,\
+ projection='gnom',lon_0=lon_0,lat_0=lat_0,\
+ rsphere=rsphere)
+ m.bluemarble()
+ m.drawparallels(np.arange(-90,91,10),color='0.5')
+ m.drawmeridians(np.arange(0,360,10),color='0.5')
+fig.text(0.625,0.75,\
+ 'World Map on a Cube\n Gnomonic Projection',\
+ fontsize=14)
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

View entire thread

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.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /