Revision: 6139
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6139&view=rev
Author: jswhit
Date: 2008-10-01 02:24:15 +0000 (Wed, 01 Oct 2008)
Log Message:
-----------
van der Grinten fix
Modified Paths:
--------------
trunk/toolkits/basemap/examples/test.py
Modified: trunk/toolkits/basemap/examples/test.py
===================================================================
--- trunk/toolkits/basemap/examples/test.py 2008-09-30 20:14:38 UTC (rev
6138)
+++ trunk/toolkits/basemap/examples/test.py 2008-10-01 02:24:15 UTC (rev
6139)
@@ -667,18 +667,10 @@
fig=plt.figure()
# create Basemap instance for van der Grinten projection.
m = Basemap(projection='vandg',lon_0=0.5*(lonsin[0]+lonsin[-1]))
-# add poles to data.
-tmpdat = np.empty((len(latsin)+2,len(lonsin)),topodatin.dtype)
-tmpdat[1:-1,:] = topodatin
-tmpdat[0,:] = topodatin[1,:].mean()
-tmpdat[-1,:] = topodatin[-1,:].mean()
-lats2 = np.empty(len(latsin)+2,latsin.dtype)
-lats2[1:-1] = latsin
-lats2[0] = -90; latsin[-1] = 90
ax = fig.add_axes([0.1,0.1,0.7,0.7])
# plot image over map with pcolormesh.
-x,y = m(*np.meshgrid(lonsin,lats2))
-p = m.pcolormesh(x,y,tmpdat,shading='flat')
+x,y = m(*np.meshgrid(lonsin,latsin))
+p = m.pcolormesh(x,y,topodatin,shading='flat')
pos = ax.get_position()
l, b, w, h = pos.bounds
cax = plt.axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins