SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 6039
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6039&view=rev
Author: jswhit
Date: 2008年08月17日 22:56:20 +0000 (2008年8月17日)
Log Message:
-----------
update
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月17日 22:17:56 UTC (rev 6038)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月17日 22:56:20 UTC (rev 6039)
@@ -24,6 +24,9 @@
 m.bluemarble()
 m.drawparallels(np.arange(-90,91,10),color='0.5')
 m.drawmeridians(np.arange(0,360,10),color='0.5')
+ #m.drawlsmask(ocean_color='aqua',land_color='coral')
+ #m.drawparallels(np.arange(-90,91,10))
+ #m.drawmeridians(np.arange(0,360,10))
 fig.text(0.625,0.75,\
 'World Map on a Cube\n Gnomonic Projection',\
 fontsize=14)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6040
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6040&view=rev
Author: jswhit
Date: 2008年08月18日 11:44:30 +0000 (2008年8月18日)
Log Message:
-----------
minor tweaks
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月17日 22:56:20 UTC (rev 6039)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月18日 11:44:30 UTC (rev 6040)
@@ -6,7 +6,7 @@
 # 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 = plt.figure(figsize=(10,7.5))
 fig.subplots_adjust(bottom=0, left=0, right=1, top=1, wspace=0, hspace=0)
 rsphere = 6370997.
 width = 2.*rsphere; height=width
@@ -14,20 +14,20 @@
 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')
- #m.drawlsmask(ocean_color='aqua',land_color='coral')
- #m.drawparallels(np.arange(-90,91,10))
- #m.drawmeridians(np.arange(0,360,10))
-fig.text(0.625,0.75,\
- 'World Map on a Cube\n Gnomonic Projection',\
- fontsize=14)
+ if lat_0 == 0 or ncol == 1:
+ 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')
+ #m.drawlsmask(ocean_color='aqua',land_color='coral')
+ #m.drawparallels(np.arange(-90,91,10))
+ #m.drawmeridians(np.arange(0,360,10))
+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.
Revision: 6041
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6041&view=rev
Author: jswhit
Date: 2008年08月18日 14:43:13 +0000 (2008年8月18日)
Log Message:
-----------
another minor tweak
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月18日 11:44:30 UTC (rev 6040)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2008年08月18日 14:43:13 UTC (rev 6041)
@@ -23,10 +23,10 @@
 rsphere=rsphere)
 m.bluemarble()
 m.drawparallels(np.arange(-90,91,10),color='0.5')
- m.drawmeridians(np.arange(0,360,10),color='0.5')
+ m.drawmeridians(np.arange(5,365,10),color='0.5')
 #m.drawlsmask(ocean_color='aqua',land_color='coral')
 #m.drawparallels(np.arange(-90,91,10))
- #m.drawmeridians(np.arange(0,360,10))
+ #m.drawmeridians(np.arange(5,365,10))
 fig.text (0.625,0.75,\
 'World Map on a Cube\n Gnomonic Projection',\
 fontsize=14)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6542
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6542&view=rev
Author: jswhit
Date: 2008年12月10日 12:33:52 +0000 (2008年12月10日)
Log Message:
-----------
downsample bluemarble image for speed
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	2008年12月10日 12:17:52 UTC (rev 6541)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2008年12月10日 12:33:52 UTC (rev 6542)
@@ -21,7 +21,7 @@
 m = Basemap(width=width,height=height,resolution=None,\
 projection='gnom',lon_0=lon_0,lat_0=lat_0,\
 rsphere=rsphere)
- m.bluemarble()
+ m.bluemarble(scale=0.5)
 m.drawparallels(np.arange(-90,91,10),color='0.5')
 m.drawmeridians(np.arange(5,365,10),color='0.5')
 #m.drawlsmask(ocean_color='aqua',land_color='coral')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7986
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7986&view=rev
Author: jswhit
Date: 2009年11月26日 19:37:06 +0000 (2009年11月26日)
Log Message:
-----------
fix_aspect=False so no whitespace appears on resize.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/cubed_sphere.py
===================================================================
--- trunk/toolkits/basemap/examples/cubed_sphere.py	2009年11月24日 18:45:18 UTC (rev 7985)
+++ trunk/toolkits/basemap/examples/cubed_sphere.py	2009年11月26日 19:37:06 UTC (rev 7986)
@@ -1,11 +1,14 @@
 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.
+
+# choose figure size to match aspect ratio of map.
 fig = plt.figure(figsize=(10,7.5))
 fig.subplots_adjust(bottom=0, left=0, right=1, top=1, wspace=0, hspace=0)
 rsphere = 6370997.
@@ -18,16 +21,18 @@
 ax=fig.add_subplot(3,4,npanel)
 ax.set_frame_on(False)
 lon_0=225 + 90*(ncol+1) - 45
+ # use fix_aspect=False, so white space won't appear between
+ # faces of cube when window is resized.
 m = Basemap(width=width,height=height,resolution=None,\
 projection='gnom',lon_0=lon_0,lat_0=lat_0,\
- rsphere=rsphere)
+ rsphere=rsphere,fix_aspect=False)
 m.bluemarble(scale=0.5)
 m.drawparallels(np.arange(-90,91,10),color='0.5')
 m.drawmeridians(np.arange(5,365,10),color='0.5')
 #m.drawlsmask(ocean_color='aqua',land_color='coral')
 #m.drawparallels(np.arange(-90,91,10))
 #m.drawmeridians(np.arange(5,365,10))
-fig.text (0.625,0.75,\
- 'World Map on a Cube\n Gnomonic Projection',\
- fontsize=14)
+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.
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 によって変換されたページ (->オリジナル) /