SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(3)
2
(2)
3
(5)
4
(1)
5
6
7
(6)
8
(3)
9
(7)
10
(6)
11
(14)
12
(6)
13
(10)
14
(6)
15
16
17
(15)
18
(6)
19
(1)
20
(4)
21
(8)
22
(9)
23
(12)
24
(35)
25
(21)
26
(14)
27
(11)
28
(9)
29
(11)
30
(6)
31
(9)


Showing results of 240

<< < 1 .. 6 7 8 9 10 > >> (Page 8 of 10)
From: <js...@us...> - 2008年07月14日 11:55:46
Revision: 5766
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5766&view=rev
Author: jswhit
Date: 2008年07月14日 04:55:41 -0700 (2008年7月14日)
Log Message:
-----------
final examples added.
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/stere.py
Added Paths:
-----------
 trunk/toolkits/basemap/doc/users/figures/aeqd.py
 trunk/toolkits/basemap/doc/users/figures/npaeqd.py
 trunk/toolkits/basemap/doc/users/figures/nplaea.py
 trunk/toolkits/basemap/doc/users/figures/npstere.py
 trunk/toolkits/basemap/doc/users/figures/spaeqd.py
 trunk/toolkits/basemap/doc/users/figures/splaea.py
 trunk/toolkits/basemap/doc/users/figures/spstere.py
Added: trunk/toolkits/basemap/doc/users/figures/aeqd.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aeqd.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/aeqd.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,20 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+width = 28000000; lon_0 = -105; lat_0 = 40
+m = Basemap(width=width,height=width,projection='aeqd',
+ lat_0=lat_0,lon_0=lon_0)
+# fill background.
+m.drawmapboundary(fill_color='aqua')
+# draw coasts and fill continents.
+m.drawcoastlines(linewidth=0.5)
+m.fillcontinents(color='coral',lake_color='aqua')
+# 20 degree graticule.
+m.drawparallels(np.arange(-80,81,20))
+m.drawmeridians(np.arange(-180,180,20))
+# draw a black dot at the center.
+xpt, ypt = m(lon_0, lat_0)
+m.plot([xpt],[ypt],'ko') 
+# draw the title.
+plt.title('Azimuthal Equidistant Projection')
+plt.savefig('aeqd.png')
Added: trunk/toolkits/basemap/doc/users/figures/npaeqd.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/npaeqd.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/npaeqd.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,24 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
+# setup north polar aimuthal equidistant basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0.
+m = Basemap(projection='npaeqd',boundinglat=10,lon_0=270,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,10):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("North Polar Azimuthal Equidistant Projection")
+plt.savefig('npaeqd.png')
Added: trunk/toolkits/basemap/doc/users/figures/nplaea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/nplaea.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/nplaea.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,24 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
+# setup north polar lambert azimuthal basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0.
+m = Basemap(projection='nplaea',boundinglat=10,lon_0=270,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,10):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("North Polar Lambert Azimuthal Projection")
+plt.savefig('nplaea.png')
Added: trunk/toolkits/basemap/doc/users/figures/npstere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/npstere.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/npstere.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,24 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup north polar stereographic basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0. Default value of lat_ts
+# (latitude of true scale) is pole.
+m = Basemap(projection='npstere',boundinglat=10,lon_0=270,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,10):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("North Polar Stereographic Projection")
+plt.savefig('npstere.png')
Added: trunk/toolkits/basemap/doc/users/figures/spaeqd.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/spaeqd.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/spaeqd.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,23 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup south polar aimuthal equidistant basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0.
+m = Basemap(projection='spaeqd',boundinglat=-10,lon_0=90,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(19*m.ymin/20,m.ymin/20,10):
+ for x in np.linspace(19*m.xmin/20,m.xmin/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("South Polar Azimuthal Equidistant Projection")
+plt.savefig('spaeqd.png')
Added: trunk/toolkits/basemap/doc/users/figures/splaea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/splaea.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/splaea.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,23 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup south polar lambert azimuthal basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0.
+m = Basemap(projection='splaea',boundinglat=-10,lon_0=90,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(19*m.ymin/20,m.ymin/20,10):
+ for x in np.linspace(19*m.xmin/20,m.xmin/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("South Polar Lambert Azimuthal Projection")
+plt.savefig('splaea.png')
Added: trunk/toolkits/basemap/doc/users/figures/spstere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/spstere.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/spstere.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -0,0 +1,24 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup north polar stereographic basemap.
+# The longitude lon_0 is at 6-o'clock, and the
+# latitude circle boundinglat is tangent to the edge 
+# of the map at lon_0. Default value of lat_ts
+# (latitude of true scale) is pole.
+m = Basemap(projection='spstere',boundinglat=-10,lon_0=90,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(19*m.ymin/20,m.ymin/20,10):
+ for x in np.linspace(19*m.xmin/20,m.xmin/20,10):
+ lon, lat = m(x,y,inverse=True)
+ poly = m.tissot(lon,lat,2.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
+plt.title("South Polar Stereographic Projection")
+plt.savefig('spstere.png')
Modified: trunk/toolkits/basemap/doc/users/figures/stere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月14日 01:58:13 UTC (rev 5765)
+++ trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月14日 11:55:41 UTC (rev 5766)
@@ -1,7 +1,6 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-from matplotlib.patches import Polygon
 # setup stereographic basemap.
 # lat_ts is latitude of true scale.
 # lon_0,lat_0 is central point.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月14日 01:58:14
Revision: 5765
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5765&view=rev
Author: jswhit
Date: 2008年07月13日 18:58:13 -0700 (2008年7月13日)
Log Message:
-----------
fixes for updated tissot method.
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/aea.py
 trunk/toolkits/basemap/doc/users/figures/eqdc.py
 trunk/toolkits/basemap/doc/users/figures/laea.py
 trunk/toolkits/basemap/doc/users/figures/lcc.py
 trunk/toolkits/basemap/doc/users/figures/stere.py
Modified: trunk/toolkits/basemap/doc/users/figures/aea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 20:51:25 UTC (rev 5764)
+++ trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月14日 01:58:13 UTC (rev 5765)
@@ -1,7 +1,6 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-from matplotlib.patches import Polygon
 # setup albers equal area conic basemap
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel.
@@ -21,8 +20,7 @@
 for y in np.linspace(m.ymax/20,19*m.ymax/20,10):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
- seg = m.tissot(lon,lat,1.,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(lon,lat,1.25,100,\
+ facecolor='green',zorder=10,alpha=0.5)
 plt.title("Albers Equal Area Projection")
 plt.savefig('aea.png')
Modified: trunk/toolkits/basemap/doc/users/figures/eqdc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/eqdc.py	2008年07月13日 20:51:25 UTC (rev 5764)
+++ trunk/toolkits/basemap/doc/users/figures/eqdc.py	2008年07月14日 01:58:13 UTC (rev 5765)
@@ -1,7 +1,6 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-from matplotlib.patches import Polygon
 # setup equidistant conic basemap.
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel.
@@ -20,8 +19,7 @@
 for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
- seg = m.tissot(lon,lat,1.5,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(lon,lat,1.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
 plt.title("Equidistant Conic Projection")
 plt.savefig('eqdc.png')
Modified: trunk/toolkits/basemap/doc/users/figures/laea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/laea.py	2008年07月13日 20:51:25 UTC (rev 5764)
+++ trunk/toolkits/basemap/doc/users/figures/laea.py	2008年07月14日 01:58:13 UTC (rev 5765)
@@ -1,7 +1,6 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-from matplotlib.patches import Polygon
 # setup lambert azimuthal equal area basemap.
 # lat_ts is latitude of true scale.
 # lon_0,lat_0 is central point.
@@ -19,8 +18,7 @@
 for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
- seg = m.tissot(lon,lat,1.5,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(lon,lat,1.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
 plt.title("Lambert Azimuthal Equal Area Projection")
 plt.savefig('laea.png')
Modified: trunk/toolkits/basemap/doc/users/figures/lcc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/lcc.py	2008年07月13日 20:51:25 UTC (rev 5764)
+++ trunk/toolkits/basemap/doc/users/figures/lcc.py	2008年07月14日 01:58:13 UTC (rev 5765)
@@ -1,7 +1,6 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-from matplotlib.patches import Polygon
 # setup lambert conformal basemap.
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel (defaults to lat_1).
@@ -24,8 +23,7 @@
 for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
- seg = m.tissot(lon,lat,1.5,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(lon,lat,1.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
 plt.title("Lambert Conformal Projection")
 plt.savefig('lcc.png')
Modified: trunk/toolkits/basemap/doc/users/figures/stere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月13日 20:51:25 UTC (rev 5764)
+++ trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月14日 01:58:13 UTC (rev 5765)
@@ -19,8 +19,7 @@
 for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
- seg = m.tissot(lon,lat,1.5,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(lon,lat,1.5,100,\
+ facecolor='green',zorder=10,alpha=0.5)
 plt.title("Stereographic Projection")
 plt.savefig('stere.png')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5764
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5764&view=rev
Author: efiring
Date: 2008年07月13日 13:51:25 -0700 (2008年7月13日)
Log Message:
-----------
Fix PatchCollection bug found by Ryan May
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/collections.py
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年07月13日 20:29:55 UTC (rev 5763)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年07月13日 20:51:25 UTC (rev 5764)
@@ -888,7 +888,7 @@
 
 if match_original:
 def determine_facecolor(patch):
- if patch.fill():
+ if patch.fill:
 return patch.get_facecolor()
 return [0, 0, 0, 0]
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月13日 20:29:58
Revision: 5763
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5763&view=rev
Author: jswhit
Date: 2008年07月13日 13:29:55 -0700 (2008年7月13日)
Log Message:
-----------
have tissot method do actual drawing.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/plot_tissot.py
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/examples/plot_tissot.py
===================================================================
--- trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月13日 13:27:33 UTC (rev 5762)
+++ trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月13日 20:29:55 UTC (rev 5763)
@@ -2,7 +2,6 @@
 import matplotlib.pyplot as plt
 from mpl_toolkits.basemap import Basemap 
 from mpl_toolkits.basemap import __version__ as basemap_version
-from matplotlib.patches import Polygon
 
 # Tissot's Indicatrix (http://en.wikipedia.org/wiki/Tissot's_Indicatrix). 
 # These diagrams illustrate the distortion inherent in all map projections.
@@ -29,13 +28,10 @@
 for m in [m1,m2,m3,m4,m5]:
 # make a new figure.
 fig = plt.figure()
- ax = plt.gca()
 # draw "circles" at specified longitudes and latitudes.
 for parallel in range(-60,61,30):
 for meridian in range(-165,166,30):
- seg = m.tissot(meridian,parallel,6,100)
- poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
- ax.add_patch(poly)
+ poly = m.tissot(meridian,parallel,6,100,facecolor='green',zorder=10,alpha=0.5)
 # draw meridians and parallels.
 m.drawparallels(np.arange(-60,61,30))
 m.drawmeridians(np.arange(-180,180,60))
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月13日 13:27:33 UTC (rev 5762)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月13日 20:29:55 UTC (rev 5763)
@@ -2146,16 +2146,30 @@
 if v == ([], []): del linecolls[k]
 return linecolls
 
- def tissot(self,lon_0,lat_0,radius_deg,npts):
+ def tissot(self,lon_0,lat_0,radius_deg,npts,ax=None,**kwargs):
 """
- create list of ``npts`` x,y pairs that are equidistant on the
- surface of the earth from central point ``lon_0,lat_0`` and form
- an ellipse with radius of ``radius_deg`` degrees of latitude along
- longitude ``lon_0``.
- The ellipse represents a Tissot's indicatrix
+ Draw a polygon centered at ``lon_0,lat_0``. The polygon
+ approximates a circle on the surface of the earth with radius
+ ``radius_deg`` degrees latitude along longitude ``lon_0``,
+ made up of ``npts`` vertices. 
+ The polygon represents a Tissot's indicatrix
 (http://en.wikipedia.org/wiki/Tissot's_Indicatrix),
 which when drawn on a map shows the distortion
- inherent in the map projection."""
+ inherent in the map projection.
+
+ Extra keyword ``ax`` can be used to override the default axis instance.
+
+ Other \**kwargs passed on to matplotlib.patches.Polygon."""
+ if not kwargs.has_key('ax') and self.ax is None:
+ try:
+ ax = plt.gca()
+ except:
+ import matplotlib.pyplot as plt
+ ax = plt.gca()
+ elif not kwargs.has_key('ax') and self.ax is not None:
+ ax = self.ax
+ else:
+ ax = kwargs.pop('ax')
 g = pyproj.Geod(a=self.rmajor,b=self.rminor)
 az12,az21,dist = g.inv(lon_0,lat_0,lon_0,lat_0+radius_deg)
 seg = [self(lon_0,lat_0+radius_deg)]
@@ -2172,7 +2186,11 @@
 # add segment if it is in the map projection region.
 if x < 1.e20 and y < 1.e20:
 seg.append((x,y))
- return seg
+ poly = Polygon(seg,**kwargs)
+ ax.add_patch(poly)
+ # set axes limits to fit map region.
+ self.set_axes_limits(ax=ax)
+ return poly
 
 def gcpoints(self,lon1,lat1,lon2,lat2,npoints):
 """
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5762
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5762&view=rev
Author: jswhit
Date: 2008年07月13日 06:27:33 -0700 (2008年7月13日)
Log Message:
-----------
update
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/aea.py
Modified: trunk/toolkits/basemap/doc/users/figures/aea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 13:24:30 UTC (rev 5761)
+++ trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 13:27:33 UTC (rev 5762)
@@ -6,7 +6,7 @@
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel.
 # lon_0,lat_0 is central point.
-m = Basemap(width=8000000,height=6000000,
+m = Basemap(width=8000000,height=7000000,
 resolution='l',projection='aea',\
 lat_1=40.,lat_2=60,lon_0=35,lat_0=50)
 m.drawcoastlines()
@@ -18,7 +18,7 @@
 m.drawmapboundary(fill_color='aqua') 
 # draw tissot's indicatrix to show distortion.
 ax = plt.gca()
-for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+for y in np.linspace(m.ymax/20,19*m.ymax/20,10):
 for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
 lon, lat = m(x,y,inverse=True)
 seg = m.tissot(lon,lat,1.,100)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5761
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5761&view=rev
Author: jswhit
Date: 2008年07月13日 06:24:30 -0700 (2008年7月13日)
Log Message:
-----------
make polygons transparent
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/plot_tissot.py
Modified: trunk/toolkits/basemap/examples/plot_tissot.py
===================================================================
--- trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月13日 13:23:15 UTC (rev 5760)
+++ trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月13日 13:24:30 UTC (rev 5761)
@@ -34,7 +34,7 @@
 for parallel in range(-60,61,30):
 for meridian in range(-165,166,30):
 seg = m.tissot(meridian,parallel,6,100)
- poly = Polygon(seg,facecolor='green',zorder=10)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
 ax.add_patch(poly)
 # draw meridians and parallels.
 m.drawparallels(np.arange(-60,61,30))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月13日 13:23:18
Revision: 5760
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5760&view=rev
Author: jswhit
Date: 2008年07月13日 06:23:15 -0700 (2008年7月13日)
Log Message:
-----------
add new examples.
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/mapsetup.rst
Added Paths:
-----------
 trunk/toolkits/basemap/doc/users/aea.rst
 trunk/toolkits/basemap/doc/users/eqdc.rst
 trunk/toolkits/basemap/doc/users/geos.rst
 trunk/toolkits/basemap/doc/users/laea.rst
 trunk/toolkits/basemap/doc/users/lcc.rst
 trunk/toolkits/basemap/doc/users/poly.rst
 trunk/toolkits/basemap/doc/users/stere.rst
Added: trunk/toolkits/basemap/doc/users/aea.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/aea.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/aea.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,17 @@
+.. _aea:
+
+Albers Equal Area Projection
+============================
+
+An equal-area projection. The green shapes drawn on the map are equal-area
+circles on the surface of the earth. Known as "Tissot's indicatrix",
+they can be used to show the angular and areal distortion of a map projection.
+On a conformal projection, the shape of the circles is preserved, but the
+area is not. On a equal-area projection, the area is preserved but the 
+shape is not.
+
+Distortion is very large near the poles in this projection.
+
+.. literalinclude:: figures/aea.py
+
+.. image:: figures/aea.png
Added: trunk/toolkits/basemap/doc/users/eqdc.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/eqdc.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/eqdc.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,16 @@
+.. _eqdc:
+
+Equidistant Conic Projection
+============================
+
+Neither conformal or equal area. Parallels are equally spaced.
+The green shapes drawn on the map are equal-area
+circles on the surface of the earth. Known as "Tissot's indicatrix",
+they can be used to show the angular and areal distortion of a map projection.
+On a conformal projection, the shape of the circles is preserved, but the
+area is not. On a equal-area projection, the area is preserved but the 
+shape is not.
+
+.. literalinclude:: figures/eqdc.py
+
+.. image:: figures/eqdc.png
Added: trunk/toolkits/basemap/doc/users/geos.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/geos.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/geos.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,15 @@
+.. _geos:
+
+Geostationary Projection
+========================
+
+The geostationary projection displays the earth as a satellite 
+(in geostationary orbit) would see it.
+
+.. literalinclude:: figures/geos_full.py
+
+.. image:: figures/geos_full.png
+
+.. literalinclude:: figures/geos_partial.py
+
+.. image:: figures/geos_partial.png
Added: trunk/toolkits/basemap/doc/users/laea.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/laea.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/laea.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,15 @@
+.. _laea:
+
+Lambert Azimuthal Equal Area Projection
+=======================================
+
+An equal-area projection. The green shapes drawn on the map are equal-area
+circles on the surface of the earth. Known as "Tissot's indicatrix",
+they can be used to show the angular and areal distortion of a map projection.
+On a conformal projection, the shape of the circles is preserved, but the
+area is not. On a equal-area projection, the area is preserved but the 
+shape is not.
+
+.. literalinclude:: figures/laea.py
+
+.. image:: figures/laea.png
Added: trunk/toolkits/basemap/doc/users/lcc.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/lcc.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/lcc.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,15 @@
+.. _lcc:
+
+Lambert Conformal Projection
+============================
+
+A conformal projection. The green shapes drawn on the map are equal-area
+circles on the surface of the earth. Known as "Tissot's indicatrix",
+they can be used to show the angular and areal distortion of a map projection.
+On a conformal projection, the shape of the circles is preserved, but the
+area is not. On a equal-area projection, the area is preserved but the 
+shape is not.
+
+.. literalinclude:: figures/lcc.py
+
+.. image:: figures/lcc.png
Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mapsetup.rst	2008年07月13日 13:18:16 UTC (rev 5759)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -35,6 +35,7 @@
 azeqd.rst
 gnomon.rst
 ortho.rst
+ geos.rst
 moll.rst
 robin.rst
 sinu.rst
@@ -43,4 +44,10 @@
 merc.rst
 tmerc.rst
 omerc.rst
+ poly.rst
 mill.rst
+ lcc.rst
+ laea.rst
+ stere.rst
+ eqdc.rst
+ aea.rst
Added: trunk/toolkits/basemap/doc/users/poly.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/poly.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/poly.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,8 @@
+.. _poly:
+
+Polyconic Projection
+====================
+
+.. literalinclude:: figures/poly.py
+
+.. image:: figures/poly.png
Added: trunk/toolkits/basemap/doc/users/stere.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/stere.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/stere.rst	2008年07月13日 13:23:15 UTC (rev 5760)
@@ -0,0 +1,15 @@
+.. _stere:
+
+Stereographic Projection
+========================
+
+A conformal projection. The green shapes drawn on the map are equal-area
+circles on the surface of the earth. Known as "Tissot's indicatrix",
+they can be used to show the angular and areal distortion of a map projection.
+On a conformal projection, the shape of the circles is preserved, but the
+area is not. On a equal-area projection, the area is preserved but the 
+shape is not.
+
+.. literalinclude:: figures/stere.py
+
+.. image:: figures/stere.png
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5759
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5759&view=rev
Author: jswhit
Date: 2008年07月13日 06:18:16 -0700 (2008年7月13日)
Log Message:
-----------
update
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/poly.py
Modified: trunk/toolkits/basemap/doc/users/figures/poly.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/poly.py	2008年07月13日 13:03:48 UTC (rev 5758)
+++ trunk/toolkits/basemap/doc/users/figures/poly.py	2008年07月13日 13:18:16 UTC (rev 5759)
@@ -1,12 +1,12 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
-# setup lccconic basemap 
+# setup polyconic basemap 
 # by specifying lat/lon corners and central point.
 # area_thresh=1000 means don't plot coastline features less
 # than 1000 km^2 in area.
 m = Basemap(llcrnrlon=-35.,llcrnrlat=-30,urcrnrlon=80.,urcrnrlat=50.,\
- resolution='l',area_thresh=1000.,projection='lcc',\
+ resolution='l',area_thresh=1000.,projection='poly',\
 lat_0=0.,lon_0=20.)
 m.drawcoastlines()
 m.fillcontinents(color='coral',lake_color='aqua')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5758
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5758&view=rev
Author: jswhit
Date: 2008年07月13日 06:03:48 -0700 (2008年7月13日)
Log Message:
-----------
update
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/geos_full.py
Modified: trunk/toolkits/basemap/doc/users/figures/geos_full.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/geos_full.py	2008年07月13日 12:59:45 UTC (rev 5757)
+++ trunk/toolkits/basemap/doc/users/figures/geos_full.py	2008年07月13日 13:03:48 UTC (rev 5758)
@@ -3,6 +3,8 @@
 import matplotlib.pyplot as plt
 # lon_0 is the central longitude of the projection.
 # resolution = 'l' means use low resolution coastlines.
+# optional parameter 'satellite_height' may be used to
+# specify height of orbit above earth (default 35,786 km).
 m = Basemap(projection='geos',lon_0=-105,resolution='l')
 m.drawcoastlines()
 m.fillcontinents(color='coral',lake_color='aqua')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月13日 12:59:48
Revision: 5757
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5757&view=rev
Author: jswhit
Date: 2008年07月13日 05:59:45 -0700 (2008年7月13日)
Log Message:
-----------
add tissot's indicatrix to examples to indicate distortion.
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/aea.py
 trunk/toolkits/basemap/doc/users/figures/eqdc.py
 trunk/toolkits/basemap/doc/users/figures/laea.py
 trunk/toolkits/basemap/doc/users/figures/lcc.py
 trunk/toolkits/basemap/doc/users/figures/stere.py
Modified: trunk/toolkits/basemap/doc/users/figures/aea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 12:31:53 UTC (rev 5756)
+++ trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 12:59:45 UTC (rev 5757)
@@ -1,18 +1,28 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
 # setup albers equal area conic basemap
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel.
 # lon_0,lat_0 is central point.
-m = Basemap(width=12000000,height=9000000,
+m = Basemap(width=8000000,height=6000000,
 resolution='l',projection='aea',\
- lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.)
+ lat_1=40.,lat_2=60,lon_0=35,lat_0=50)
 m.drawcoastlines()
+m.drawcountries()
 m.fillcontinents(color='coral',lake_color='aqua')
 # draw parallels and meridians.
 m.drawparallels(np.arange(-80.,81.,20.))
 m.drawmeridians(np.arange(-180.,181.,20.))
 m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
+ lon, lat = m(x,y,inverse=True)
+ seg = m.tissot(lon,lat,1.,100)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
+ ax.add_patch(poly)
 plt.title("Albers Equal Area Projection")
 plt.savefig('aea.png')
Modified: trunk/toolkits/basemap/doc/users/figures/eqdc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/eqdc.py	2008年07月13日 12:31:53 UTC (rev 5756)
+++ trunk/toolkits/basemap/doc/users/figures/eqdc.py	2008年07月13日 12:59:45 UTC (rev 5757)
@@ -1,6 +1,7 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
 # setup equidistant conic basemap.
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel.
@@ -15,5 +16,12 @@
 m.drawparallels(np.arange(-80.,81.,20.))
 m.drawmeridians(np.arange(-180.,181.,20.))
 m.drawmapboundary(fill_color='aqua') 
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
+ lon, lat = m(x,y,inverse=True)
+ seg = m.tissot(lon,lat,1.5,100)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
+ ax.add_patch(poly)
 plt.title("Equidistant Conic Projection")
 plt.savefig('eqdc.png')
Modified: trunk/toolkits/basemap/doc/users/figures/laea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/laea.py	2008年07月13日 12:31:53 UTC (rev 5756)
+++ trunk/toolkits/basemap/doc/users/figures/laea.py	2008年07月13日 12:59:45 UTC (rev 5757)
@@ -1,6 +1,7 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
 # setup lambert azimuthal equal area basemap.
 # lat_ts is latitude of true scale.
 # lon_0,lat_0 is central point.
@@ -13,5 +14,13 @@
 m.drawparallels(np.arange(-80.,81.,20.))
 m.drawmeridians(np.arange(-180.,181.,20.))
 m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
+ lon, lat = m(x,y,inverse=True)
+ seg = m.tissot(lon,lat,1.5,100)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
+ ax.add_patch(poly)
 plt.title("Lambert Azimuthal Equal Area Projection")
 plt.savefig('laea.png')
Modified: trunk/toolkits/basemap/doc/users/figures/lcc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/lcc.py	2008年07月13日 12:31:53 UTC (rev 5756)
+++ trunk/toolkits/basemap/doc/users/figures/lcc.py	2008年07月13日 12:59:45 UTC (rev 5757)
@@ -1,6 +1,7 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
 # setup lambert conformal basemap.
 # lat_1 is first standard parallel.
 # lat_2 is second standard parallel (defaults to lat_1).
@@ -18,5 +19,13 @@
 m.drawparallels(np.arange(-80.,81.,20.))
 m.drawmeridians(np.arange(-180.,181.,20.))
 m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
+ lon, lat = m(x,y,inverse=True)
+ seg = m.tissot(lon,lat,1.5,100)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
+ ax.add_patch(poly)
 plt.title("Lambert Conformal Projection")
 plt.savefig('lcc.png')
Modified: trunk/toolkits/basemap/doc/users/figures/stere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月13日 12:31:53 UTC (rev 5756)
+++ trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月13日 12:59:45 UTC (rev 5757)
@@ -1,6 +1,7 @@
 from mpl_toolkits.basemap import Basemap
 import numpy as np
 import matplotlib.pyplot as plt
+from matplotlib.patches import Polygon
 # setup stereographic basemap.
 # lat_ts is latitude of true scale.
 # lon_0,lat_0 is central point.
@@ -13,5 +14,13 @@
 m.drawparallels(np.arange(-80.,81.,20.))
 m.drawmeridians(np.arange(-180.,181.,20.))
 m.drawmapboundary(fill_color='aqua') 
+# draw tissot's indicatrix to show distortion.
+ax = plt.gca()
+for y in np.linspace(m.ymax/20,19*m.ymax/20,9):
+ for x in np.linspace(m.xmax/20,19*m.xmax/20,12):
+ lon, lat = m(x,y,inverse=True)
+ seg = m.tissot(lon,lat,1.5,100)
+ poly = Polygon(seg,facecolor='green',zorder=10,alpha=0.5)
+ ax.add_patch(poly)
 plt.title("Stereographic Projection")
 plt.savefig('stere.png')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5756
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5756&view=rev
Author: jswhit
Date: 2008年07月13日 05:31:53 -0700 (2008年7月13日)
Log Message:
-----------
update
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/figures/omerc.py
Modified: trunk/toolkits/basemap/doc/users/figures/omerc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/omerc.py	2008年07月13日 12:31:46 UTC (rev 5755)
+++ trunk/toolkits/basemap/doc/users/figures/omerc.py	2008年07月13日 12:31:53 UTC (rev 5756)
@@ -9,6 +9,8 @@
 # the projection centerline.
 # Map projection coordinates are automatically rotated to true north.
 # To avoid this, set no_rot=True.
+# area_thresh=1000 means don't plot coastline features less
+# than 1000 km^2 in area.
 m = Basemap(height=16700000,width=12000000,
 resolution='l',area_thresh=1000.,projection='omerc',\
 lon_0=-100,lat_0=15,lon_2=-120,lat_2=65,lon_1=-50,lat_1=-55)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月13日 12:31:51
Revision: 5755
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5755&view=rev
Author: jswhit
Date: 2008年07月13日 05:31:46 -0700 (2008年7月13日)
Log Message:
-----------
added new example scripts.
Added Paths:
-----------
 trunk/toolkits/basemap/doc/users/figures/aea.py
 trunk/toolkits/basemap/doc/users/figures/eqdc.py
 trunk/toolkits/basemap/doc/users/figures/geos_full.py
 trunk/toolkits/basemap/doc/users/figures/geos_partial.py
 trunk/toolkits/basemap/doc/users/figures/laea.py
 trunk/toolkits/basemap/doc/users/figures/lcc.py
 trunk/toolkits/basemap/doc/users/figures/poly.py
 trunk/toolkits/basemap/doc/users/figures/stere.py
Added: trunk/toolkits/basemap/doc/users/figures/aea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aea.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/aea.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,18 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup albers equal area conic basemap
+# lat_1 is first standard parallel.
+# lat_2 is second standard parallel.
+# lon_0,lat_0 is central point.
+m = Basemap(width=12000000,height=9000000,
+ resolution='l',projection='aea',\
+ lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Albers Equal Area Projection")
+plt.savefig('aea.png')
Added: trunk/toolkits/basemap/doc/users/figures/eqdc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/eqdc.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/eqdc.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,19 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup equidistant conic basemap.
+# lat_1 is first standard parallel.
+# lat_2 is second standard parallel.
+# lon_0,lat_0 is central point.
+# resolution = 'l' for low-resolution coastlines.
+m = Basemap(width=12000000,height=9000000,
+ resolution='l',projection='eqdc',\
+ lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Equidistant Conic Projection")
+plt.savefig('eqdc.png')
Added: trunk/toolkits/basemap/doc/users/figures/geos_full.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/geos_full.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/geos_full.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,14 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# lon_0 is the central longitude of the projection.
+# resolution = 'l' means use low resolution coastlines.
+m = Basemap(projection='geos',lon_0=-105,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,120.,30.))
+m.drawmeridians(np.arange(0.,420.,60.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Full Disk Geostationary Projection")
+plt.savefig('geos_full.png')
Added: trunk/toolkits/basemap/doc/users/figures/geos_partial.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/geos_partial.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/geos_partial.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,28 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+fig = plt.figure()
+# global geostationary map centered on lon_0
+lon_0=57.
+# resolution = None means don't process the boundary datasets.
+m1 = Basemap(projection='geos',lon_0=lon_0,resolution=None)
+# add an axes with a black background
+ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
+# plot just upper right quadrant (corners determined from global map).
+# keywords llcrnrx,llcrnry,urcrnrx,urcrnry used to define the lower
+# left and upper right corners in map projection coordinates.
+# llcrnrlat,llcrnrlon,ucrnrlon,urcrnrlat could be used to define
+# lat/lon values of corners - but this won't work in cases such as this
+# where one of the corners does not lie on the earth.
+m = Basemap(projection='geos',lon_0=lon_0,resolution='l',\
+ llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
+m.drawcoastlines()
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
+m.drawcountries()
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,120.,30.))
+m.drawmeridians(np.arange(0.,360.,60.))
+m.drawmapboundary()
+plt.title('Geostationary Map Showing A Quadrant of the Globe')
+plt.savefig('geos_partial.png')
Added: trunk/toolkits/basemap/doc/users/figures/laea.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/laea.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/laea.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,17 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup lambert azimuthal equal area basemap.
+# lat_ts is latitude of true scale.
+# lon_0,lat_0 is central point.
+m = Basemap(width=12000000,height=8000000,
+ resolution='l',projection='laea',\
+ lat_ts=50,lat_0=50,lon_0=-107.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Lambert Azimuthal Equal Area Projection")
+plt.savefig('laea.png')
Added: trunk/toolkits/basemap/doc/users/figures/lcc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/lcc.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/lcc.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,22 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup lambert conformal basemap.
+# lat_1 is first standard parallel.
+# lat_2 is second standard parallel (defaults to lat_1).
+# lon_0,lat_0 is central point.
+# rsphere=(6378137.00,6356752.3142) specifies WGS4 ellipsoid
+# area_thresh=1000 means don't plot coastline features less
+# than 1000 km^2 in area.
+m = Basemap(width=12000000,height=9000000,
+ rsphere=(6378137.00,6356752.3142),\
+ resolution='l',area_thresh=1000.,projection='lcc',\
+ lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Lambert Conformal Projection")
+plt.savefig('lcc.png')
Added: trunk/toolkits/basemap/doc/users/figures/poly.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/poly.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/poly.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,18 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup lccconic basemap 
+# by specifying lat/lon corners and central point.
+# area_thresh=1000 means don't plot coastline features less
+# than 1000 km^2 in area.
+m = Basemap(llcrnrlon=-35.,llcrnrlat=-30,urcrnrlon=80.,urcrnrlat=50.,\
+ resolution='l',area_thresh=1000.,projection='lcc',\
+ lat_0=0.,lon_0=20.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Polyconic Projection")
+plt.savefig('poly.png')
Added: trunk/toolkits/basemap/doc/users/figures/stere.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/stere.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/stere.py	2008年07月13日 12:31:46 UTC (rev 5755)
@@ -0,0 +1,17 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup stereographic basemap.
+# lat_ts is latitude of true scale.
+# lon_0,lat_0 is central point.
+m = Basemap(width=12000000,height=8000000,
+ resolution='l',projection='stere',\
+ lat_ts=50,lat_0=50,lon_0=-107.)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Stereographic Projection")
+plt.savefig('stere.png')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月12日 21:33:56
Revision: 5754
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5754&view=rev
Author: jdh2358
Date: 2008年07月12日 14:33:54 -0700 (2008年7月12日)
Log Message:
-----------
added support for external backends
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/__init__.py
 trunk/matplotlib/lib/matplotlib/backends/__init__.py
 trunk/matplotlib/lib/matplotlib/backends/backend_template.py
 trunk/matplotlib/matplotlibrc.template
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年07月12日 21:15:00 UTC (rev 5753)
+++ trunk/matplotlib/CHANGELOG	2008年07月12日 21:33:54 UTC (rev 5754)
@@ -1,3 +1,6 @@
+2008年07月12日 Added support for external backends with the
+ "module://my_backend" syntax - JDH
+
 2008年07月11日 Fix memory leak related to shared axes. Grouper should
 store weak references. - MGD
 
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py	2008年07月12日 21:15:00 UTC (rev 5753)
+++ trunk/matplotlib/lib/matplotlib/__init__.py	2008年07月12日 21:33:54 UTC (rev 5754)
@@ -801,8 +801,11 @@
 if warn: warnings.warn(_use_error_msg)
 return
 arg = arg.lower()
- be_parts = arg.split('.')
- name = validate_backend(be_parts[0])
+ if arg.startswith('module://'):
+ name = arg
+ else:
+ be_parts = arg.split('.')
+ name = validate_backend(be_parts[0])
 rcParams['backend'] = name
 if name == 'cairo' and len(be_parts) > 1:
 rcParams['cairo.format'] = validate_cairo_format(be_parts[1])
Modified: trunk/matplotlib/lib/matplotlib/backends/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/__init__.py	2008年07月12日 21:15:00 UTC (rev 5753)
+++ trunk/matplotlib/lib/matplotlib/backends/__init__.py	2008年07月12日 21:33:54 UTC (rev 5754)
@@ -1,10 +1,7 @@
 
 import matplotlib
-from matplotlib.rcsetup import interactive_bk
-from matplotlib.rcsetup import non_interactive_bk
-from matplotlib.rcsetup import all_backends
-from matplotlib.rcsetup import validate_backend
 
+
 __all__ = ['backend','show','draw_if_interactive',
 'new_figure_manager', 'backend_version']
 
@@ -14,28 +11,24 @@
 'return new_figure_manager, draw_if_interactive and show for pylab'
 # Import the requested backend into a generic module object
 
- backend_name = 'backend_'+backend
- backend_name = backend_name.lower() # until we banish mixed case
- backend_mod = __import__('matplotlib.backends.'+backend_name,
+ if backend.startswith('module://'):
+ backend_name = backend[9:]
+ else:
+ backend_name = 'backend_'+backend
+ backend_name = backend_name.lower() # until we banish mixed case
+ backend_name = 'matplotlib.backends.%s'%backend_name.lower()
+ backend_mod = __import__(backend_name,
 globals(),locals(),[backend_name])
 
 # Things we pull in from all backends
 new_figure_manager = backend_mod.new_figure_manager
 
- if hasattr(backend_mod,'backend_version'):
- backend_version = getattr(backend_mod,'backend_version')
- else: backend_version = 'unknown'
 
+ def do_nothing(*args, **kwargs): pass
+ backend_version = getattr(backend_mod,'backend_version', 'unknown')
+ show = getattr(backend_mod, 'show', do_nothing)
+ draw_if_interactive = getattr(backend_mod, 'draw_if_interactive', do_nothing)
 
-
- # Now define the public API according to the kind of backend in use
- if backend in interactive_bk:
- show = backend_mod.show
- draw_if_interactive = backend_mod.draw_if_interactive
- else: # non-interactive backends
- def draw_if_interactive(): pass
- def show(): pass
-
 # Additional imports which only happen for certain backends. This section
 # should probably disappear once all backends are uniform.
 if backend.lower() in ['wx','wxagg']:
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_template.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_template.py	2008年07月12日 21:15:00 UTC (rev 5753)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_template.py	2008年07月12日 21:33:54 UTC (rev 5754)
@@ -17,7 +17,7 @@
 with 'xxx'. Then implement the class methods and functions below, and
 add 'xxx' to the switchyard in matplotlib/backends/__init__.py and
 'xxx' to the backends list in the validate_backend methon in
-matplotlib/__init__.py and you're off. You can use your backend with
+matplotlib/__init__.py and you're off. You can use your backend with::
 
 import matplotlib
 matplotlib.use('xxx')
@@ -25,6 +25,17 @@
 plot([1,2,3])
 show()
 
+matplotlib also supports external backends, so you can place you can
+use any module in your PYTHONPATH with the syntax::
+
+ import matplotlib
+ matplotlib.use('module://my_backend')
+
+where my_backend.py is your module name. Thus syntax is also
+recognized in the rc file and in the -d argument in pylab, eg::
+
+ python simple_plot.py -dmodule://my_backend
+
 The files that are most relevant to backend_writers are
 
 matplotlib/backends/backend_your_backend.py
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template	2008年07月12日 21:15:00 UTC (rev 5753)
+++ trunk/matplotlib/matplotlibrc.template	2008年07月12日 21:33:54 UTC (rev 5754)
@@ -19,8 +19,12 @@
 # such as 0.75 - a legal html color name, eg red, blue, darkslategray
 
 #### CONFIGURATION BEGINS HERE
+
 # the default backend; one of GTK GTKAgg GTKCairo CocoaAgg FltkAgg
-# QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template
+# QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template You
+# can also deploy your own backend outside of matplotlib by referring
+# to the module name (which must be in the PYTHONPATH) as
+# 'module://my_backend'
 backend : %(backend)s
 numerix : %(numerix)s # numpy, Numeric or numarray
 #maskedarray : False # True to use external maskedarray module
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年07月12日 21:15:04
Revision: 5753
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5753&view=rev
Author: efiring
Date: 2008年07月12日 14:15:00 -0700 (2008年7月12日)
Log Message:
-----------
Handle markeredgecolor=None etc. consistently
Modified Paths:
--------------
 branches/v0_91_maint/lib/matplotlib/lines.py
Modified: branches/v0_91_maint/lib/matplotlib/lines.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/lines.py	2008年07月12日 21:04:09 UTC (rev 5752)
+++ branches/v0_91_maint/lib/matplotlib/lines.py	2008年07月12日 21:15:00 UTC (rev 5753)
@@ -238,12 +238,6 @@
 if linestyle is None : linestyle=rcParams['lines.linestyle']
 if marker is None : marker=rcParams['lines.marker']
 if color is None : color=rcParams['lines.color']
- if markeredgecolor is None :
- markeredgecolor='auto'
- if markerfacecolor is None :
- markerfacecolor='auto'
- if markeredgewidth is None :
- markeredgewidth=rcParams['lines.markeredgewidth']
 
 if markersize is None : markersize=rcParams['lines.markersize']
 if antialiased is None : antialiased=rcParams['lines.antialiased']
@@ -654,6 +648,8 @@
 
 ACCEPTS: any matplotlib color
 """
+ if ec is None:
+ ec = 'auto'
 self._markeredgecolor = ec
 
 def set_markeredgewidth(self, ew):
@@ -662,6 +658,8 @@
 
 ACCEPTS: float value in points
 """
+ if ew is None:
+ ew = rcParams['lines.markeredgewidth']
 self._markeredgewidth = ew
 
 def set_markerfacecolor(self, fc):
@@ -670,6 +668,8 @@
 
 ACCEPTS: any matplotlib color
 """
+ if fc is None:
+ fc = 'auto'
 self._markerfacecolor = fc
 
 def set_markersize(self, sz):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年07月12日 21:04:12
Revision: 5752
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5752&view=rev
Author: efiring
Date: 2008年07月12日 14:04:09 -0700 (2008年7月12日)
Log Message:
-----------
Handle markerfacecolor=None etc. consistenty
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年07月12日 13:22:55 UTC (rev 5751)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年07月12日 21:04:09 UTC (rev 5752)
@@ -215,12 +215,6 @@
 if linestyle is None : linestyle=rcParams['lines.linestyle']
 if marker is None : marker=rcParams['lines.marker']
 if color is None : color=rcParams['lines.color']
- if markeredgecolor is None :
- markeredgecolor='auto'
- if markerfacecolor is None :
- markerfacecolor='auto'
- if markeredgewidth is None :
- markeredgewidth=rcParams['lines.markeredgewidth']
 
 if markersize is None : markersize=rcParams['lines.markersize']
 if antialiased is None : antialiased=rcParams['lines.antialiased']
@@ -628,6 +622,8 @@
 
 ACCEPTS: any matplotlib color
 """
+ if ec is None :
+ ec = 'auto'
 self._markeredgecolor = ec
 
 def set_markeredgewidth(self, ew):
@@ -636,6 +632,8 @@
 
 ACCEPTS: float value in points
 """
+ if ew is None :
+ ew = rcParams['lines.markeredgewidth']
 self._markeredgewidth = ew
 
 def set_markerfacecolor(self, fc):
@@ -644,6 +642,8 @@
 
 ACCEPTS: any matplotlib color
 """
+ if fc is None :
+ fc = 'auto'
 self._markerfacecolor = fc
 
 def set_markersize(self, sz):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5751
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5751&view=rev
Author: jswhit
Date: 2008年07月12日 06:22:55 -0700 (2008年7月12日)
Log Message:
-----------
add some color
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/plot_tissot.py
Modified: trunk/toolkits/basemap/examples/plot_tissot.py
===================================================================
--- trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月12日 12:30:11 UTC (rev 5750)
+++ trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月12日 13:22:55 UTC (rev 5751)
@@ -41,7 +41,8 @@
 m.drawmeridians(np.arange(-180,180,60))
 # draw coastlines, fill continents, plot title.
 m.drawcoastlines()
- m.fillcontinents()
+ m.drawmapboundary(fill_color='aqua') 
+ m.fillcontinents(color='coral',lake_color='aqua')
 title = 'Tissot Diagram: projection = %s' % m.projection
 print title
 plt.title(title)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5750
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5750&view=rev
Author: jswhit
Date: 2008年07月12日 05:30:11 -0700 (2008年7月12日)
Log Message:
-----------
fix docstring typos
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月12日 12:29:16 UTC (rev 5749)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月12日 12:30:11 UTC (rev 5750)
@@ -257,7 +257,7 @@
 lat_1 first standard parallel for lambert conformal, 
 albers equal area and equidistant conic.
 Latitude of one of the two points on the projection 
- for oblique mercator. If lat_1 is not given, but 
+ centerline for oblique mercator. If lat_1 is not given, but 
 lat_0 is, lat_1 is set to lat_0 for lambert 
 conformal, albers equal area and equidistant conic.
 lat_2 second standard parallel for lambert conformal, 
@@ -266,9 +266,9 @@
 centerline for oblique mercator. If lat_2 is not 
 given it is set to lat_1 for lambert conformal, 
 albers equal area and equidistant conic.
- lon_1 longitude of one of the two points on the projection
+ lon_1 Longitude of one of the two points on the projection
 centerline for oblique mercator.
- lon_2 longitude of one of the two points on the projection
+ lon_2 Longitude of one of the two points on the projection
 centerline for oblique mercator.
 no_rot only used by oblique mercator.
 If set to True, the map projection coordinates will 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月12日 12:29:17
Revision: 5749
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5749&view=rev
Author: jswhit
Date: 2008年07月12日 05:29:16 -0700 (2008年7月12日)
Log Message:
-----------
add omerc example
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/users/mapsetup.rst
Added Paths:
-----------
 trunk/toolkits/basemap/doc/users/figures/omerc.py
 trunk/toolkits/basemap/doc/users/omerc.rst
Added: trunk/toolkits/basemap/doc/users/figures/omerc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/omerc.py	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/omerc.py	2008年07月12日 12:29:16 UTC (rev 5749)
@@ -0,0 +1,22 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup oblique mercator basemap.
+# width is width of map projection region in km (xmax-xmin_
+# height is height of map projection region in km (ymax-ymin)
+# lon_0, lat_0 are the central longitude and latitude of the projection.
+# lat_1,lon_1 and lat_2,lon_2 are two pairs of points that define
+# the projection centerline.
+# Map projection coordinates are automatically rotated to true north.
+# To avoid this, set no_rot=True.
+m = Basemap(height=16700000,width=12000000,
+ resolution='l',area_thresh=1000.,projection='omerc',\
+ lon_0=-100,lat_0=15,lon_2=-120,lat_2=65,lon_1=-50,lat_1=-55)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Oblique Mercator Projection")
+plt.savefig('omerc.png')
Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mapsetup.rst	2008年07月11日 18:31:04 UTC (rev 5748)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst	2008年07月12日 12:29:16 UTC (rev 5749)
@@ -42,4 +42,5 @@
 cass.rst
 merc.rst
 tmerc.rst
+ omerc.rst
 mill.rst
Added: trunk/toolkits/basemap/doc/users/omerc.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/omerc.rst	 (rev 0)
+++ trunk/toolkits/basemap/doc/users/omerc.rst	2008年07月12日 12:29:16 UTC (rev 5749)
@@ -0,0 +1,14 @@
+.. _omerc:
+
+Oblique Mercator Projection
+===========================
+
+The oblique aspect of the mercator projection.
+The projection centerline, instead of being a latitude (as in
+the regular mercator projection) or a longitude (as in the
+transverse mercator projection) can be an 
+arbitrary great circle (defined by specifying two points).
+
+.. literalinclude:: figures/omerc.py
+
+.. image:: figures/omerc.png
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年07月11日 18:31:07
Revision: 5748
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5748&view=rev
Author: mdboom
Date: 2008年07月11日 11:31:04 -0700 (2008年7月11日)
Log Message:
-----------
Typo in last commit
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年07月11日 18:21:53 UTC (rev 5747)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年07月11日 18:31:04 UTC (rev 5748)
@@ -904,8 +904,8 @@
 self.xaxis.set_clip_path(self.patch)
 self.yaxis.set_clip_path(self.patch)
 
- self._shared_x_axes.clear()
- self._shared_y_axes.clear()
+ self._shared_x_axes.clean()
+ self._shared_y_axes.clean()
 
 def clear(self):
 'clear the axes'
@@ -6032,7 +6032,7 @@
 right
 """
 
- ax2 = self.figure.add_axes(self.get_position(True), sharex=self,
+ ax2 = self.figure.add_axes(self.get_position(True), # sharex=self,
 frameon=False)
 ax2.yaxis.tick_right()
 ax2.yaxis.set_label_position('right')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年07月11日 18:21:57
Revision: 5747
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5747&view=rev
Author: mdboom
Date: 2008年07月11日 11:21:53 -0700 (2008年7月11日)
Log Message:
-----------
Fix memory leak when using shared axes.
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年07月11日 16:30:07 UTC (rev 5746)
+++ trunk/matplotlib/CHANGELOG	2008年07月11日 18:21:53 UTC (rev 5747)
@@ -1,3 +1,6 @@
+2008年07月11日 Fix memory leak related to shared axes. Grouper should
+ store weak references. - MGD
+
 2008年07月10日 Bugfix: crash displaying fontconfig pattern - MGD
 
 2008年07月10日 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年07月11日 16:30:07 UTC (rev 5746)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年07月11日 18:21:53 UTC (rev 5747)
@@ -904,6 +904,8 @@
 self.xaxis.set_clip_path(self.patch)
 self.yaxis.set_clip_path(self.patch)
 
+ self._shared_x_axes.clear()
+ self._shared_y_axes.clear()
 
 def clear(self):
 'clear the axes'
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py	2008年07月11日 16:30:07 UTC (rev 5746)
+++ trunk/matplotlib/lib/matplotlib/cbook.py	2008年07月11日 18:21:53 UTC (rev 5747)
@@ -6,6 +6,7 @@
 import re, os, errno, sys, StringIO, traceback, locale, threading
 import time, datetime
 import numpy as np
+from weakref import ref
 
 major, minor1, minor2, s, tmp = sys.version_info
 
@@ -1042,24 +1043,34 @@
 def __init__(self, init=[]):
 mapping = self._mapping = {}
 for x in init:
- mapping[x] = [x]
+ mapping[ref(x)] = [ref(x)]
 
 def __contains__(self, item):
- return item in self._mapping
+ return ref(item) in self._mapping
 
+ def clean(self):
+ """
+ Clean dead weak references from the dictionary
+ """
+ mapping = self._mapping
+ for key, val in mapping.items():
+ if key() is None:
+ del mapping[key]
+ val.remove(key)
+
 def join(self, a, *args):
 """
 Join given arguments into the same set. Accepts one or more
 arguments.
 """
 mapping = self._mapping
- set_a = mapping.setdefault(a, [a])
+ set_a = mapping.setdefault(ref(a), [ref(a)])
 
 for arg in args:
- set_b = mapping.get(arg)
+ set_b = mapping.get(ref(arg))
 if set_b is None:
- set_a.append(arg)
- mapping[arg] = set_a
+ set_a.append(ref(arg))
+ mapping[ref(arg)] = set_a
 elif set_b is not set_a:
 if len(set_b) > len(set_a):
 set_a, set_b = set_b, set_a
@@ -1067,13 +1078,17 @@
 for elem in set_b:
 mapping[elem] = set_a
 
+ self.clean()
+
 def joined(self, a, b):
 """
 Returns True if *a* and *b* are members of the same set.
 """
+ self.clean()
+
 mapping = self._mapping
 try:
- return mapping[a] is mapping[b]
+ return mapping[ref(a)] is mapping[ref(b)]
 except KeyError:
 return False
 
@@ -1083,6 +1098,8 @@
 
 The iterator is invalid if interleaved with calls to join().
 """
+ self.clean()
+
 class Token: pass
 token = Token()
 
@@ -1090,7 +1107,7 @@
 # and don't yield it twice
 for group in self._mapping.itervalues():
 if not group[-1] is token:
- yield group
+ yield [x() for x in group]
 group.append(token)
 
 # Cleanup the tokens
@@ -1102,9 +1119,12 @@
 """
 Returns all of the items joined with *a*, including itself.
 """
- return self._mapping.get(a, [a])
+ self.clean()
 
+ siblings = self._mapping.get(ref(a), [ref(a)])
+ return [x() for x in siblings]
 
+
 def simple_linear_interpolation(a, steps):
 steps = np.floor(steps)
 new_length = ((len(a) - 1) * steps) + 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5746
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5746&view=rev
Author: jswhit
Date: 2008年07月11日 09:30:07 -0700 (2008年7月11日)
Log Message:
-----------
fix typo
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 15:50:28 UTC (rev 5745)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 16:30:07 UTC (rev 5746)
@@ -2153,7 +2153,7 @@
 an ellipse with radius of ``radius_deg`` degrees of latitude along
 longitude ``lon_0``.
 The ellipse represents a Tissot's indicatrix
- (http://en.wikipedia.org/wiki/Tissot%27s_Indicatrix),
+ (http://en.wikipedia.org/wiki/Tissot's_Indicatrix),
 which when drawn on a map shows the distortion
 inherent in the map projection."""
 g = pyproj.Geod(a=self.rmajor,b=self.rminor)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5745
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5745&view=rev
Author: jswhit
Date: 2008年07月11日 08:50:28 -0700 (2008年7月11日)
Log Message:
-----------
check for required Basemap version.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/plot_tissot.py
Modified: trunk/toolkits/basemap/examples/plot_tissot.py
===================================================================
--- trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月11日 15:48:04 UTC (rev 5744)
+++ trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月11日 15:50:28 UTC (rev 5745)
@@ -1,6 +1,7 @@
 import numpy as np
 import matplotlib.pyplot as plt
 from mpl_toolkits.basemap import Basemap 
+from mpl_toolkits.basemap import __version__ as basemap_version
 from matplotlib.patches import Polygon
 
 # Tissot's Indicatrix (http://en.wikipedia.org/wiki/Tissot's_Indicatrix). 
@@ -11,6 +12,10 @@
 # Tissot's indicatrix have all unit area, although their shapes and 
 # orientations vary with location.
 
+# requires Basemap version 0.99.1
+if basemap_version < '0.99.1':
+ raise SystemExit("this example requires Basemap version 0.99.1 or higher")
+
 # create Basemap instances with several different projections
 m1 = Basemap(llcrnrlon=-180,llcrnrlat=-80,urcrnrlon=180,urcrnrlat=80,
 projection='cyl')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月11日 15:48:14
Revision: 5744
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5744&view=rev
Author: jswhit
Date: 2008年07月11日 08:48:04 -0700 (2008年7月11日)
Log Message:
-----------
up version number to 0.99.1
Modified Paths:
--------------
 trunk/toolkits/basemap/Changelog
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
 trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog	2008年07月11日 15:45:55 UTC (rev 5743)
+++ trunk/toolkits/basemap/Changelog	2008年07月11日 15:48:04 UTC (rev 5744)
@@ -1,3 +1,4 @@
+version 0.99.1 (not yet released)
 * added "tissot" method for generating Tissot's indicatrix
 (see example plot_tissot.py).
 * fixed processing of coastlines for gnomonic projection.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 15:45:55 UTC (rev 5743)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 15:48:04 UTC (rev 5744)
@@ -41,7 +41,7 @@
 # basemap data files now installed in lib/matplotlib/toolkits/basemap/data
 basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
 
-__version__ = '0.99'
+__version__ = '0.99.1'
 
 # supported map projections.
 _projnames = {'cyl' : 'Cylindrical Equidistant',
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py	2008年07月11日 15:45:55 UTC (rev 5743)
+++ trunk/toolkits/basemap/setup.py	2008年07月11日 15:48:04 UTC (rev 5744)
@@ -189,7 +189,7 @@
 package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
 setup(
 name = "basemap",
- version = "0.99",
+ version = "0.99.1",
 description = "Plot data on map projections with matplotlib",
 long_description = """
 An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5743
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5743&view=rev
Author: jswhit
Date: 2008年07月11日 08:45:55 -0700 (2008年7月11日)
Log Message:
-----------
eliminate uneeded import
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/plot_tissot.py
Modified: trunk/toolkits/basemap/examples/plot_tissot.py
===================================================================
--- trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月11日 15:41:48 UTC (rev 5742)
+++ trunk/toolkits/basemap/examples/plot_tissot.py	2008年07月11日 15:45:55 UTC (rev 5743)
@@ -1,7 +1,6 @@
 import numpy as np
 import matplotlib.pyplot as plt
 from mpl_toolkits.basemap import Basemap 
-from mpl_toolkits.basemap import pyproj 
 from matplotlib.patches import Polygon
 
 # Tissot's Indicatrix (http://en.wikipedia.org/wiki/Tissot's_Indicatrix). 
@@ -16,6 +15,7 @@
 m1 = Basemap(llcrnrlon=-180,llcrnrlat=-80,urcrnrlon=180,urcrnrlat=80,
 projection='cyl')
 m2 = Basemap(lon_0=-60,lat_0=45,projection='ortho')
+# use WGS84 ellipsoid in this one.
 m3 = Basemap(llcrnrlon=-180,llcrnrlat=-70,urcrnrlon=180,urcrnrlat=70,
 projection='merc',lat_ts=20,rsphere=(6378137.0,6356752.3142))
 m4 = Basemap(lon_0=270,lat_0=90,boundinglat=10,projection='npstere')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5742
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5742&view=rev
Author: jswhit
Date: 2008年07月11日 08:41:48 -0700 (2008年7月11日)
Log Message:
-----------
fix typo
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 15:39:08 UTC (rev 5741)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月11日 15:41:48 UTC (rev 5742)
@@ -2163,7 +2163,7 @@
 az = az12
 for n in range(npts):
 az = az+delaz
- # skip segments along equator (Geod can't handel equatorial arcs)
+ # skip segments along equator (Geod can't handle equatorial arcs)
 if np.allclose(0.,lat_0) and (np.allclose(90.,az) or np.allclose(270.,az)):
 continue
 else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing results of 240

<< < 1 .. 6 7 8 9 10 > >> (Page 8 of 10)
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 によって変換されたページ (->オリジナル) /