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
(12) |
2
(3) |
3
(2) |
4
(15) |
5
(4) |
6
(8) |
7
(14) |
8
(10) |
9
(6) |
10
(1) |
11
(5) |
12
(7) |
13
(7) |
14
(1) |
15
|
16
(1) |
17
(2) |
18
(4) |
19
(2) |
20
|
21
(1) |
22
(2) |
23
|
24
|
25
(2) |
26
(1) |
27
|
28
(4) |
29
|
30
(1) |
31
|
|
|
|
|
|
|
Revision: 5956 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5956&view=rev Author: jswhit Date: 2008年08月02日 18:54:32 +0000 (2008年8月02日) Log Message: ----------- make land_color, ocean_color kwargs in drawlsmask Modified Paths: -------------- trunk/toolkits/basemap/doc/users/figures/background2.py trunk/toolkits/basemap/examples/geos_demo.py trunk/toolkits/basemap/examples/ortho_demo.py trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/doc/users/figures/background2.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月02日 12:40:17 UTC (rev 5955) +++ trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月02日 18:54:32 UTC (rev 5956) @@ -6,5 +6,6 @@ resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) # draw a land-sea mask for a map background. # lakes=True means plot inland lakes with ocean color. -m.drawlsmask('coral','aqua',lakes=True) +m.drawlsmask(land_color='coral',ocean_color='aqua',lakes=True) +plt.show() plt.savefig('background2.png') Modified: trunk/toolkits/basemap/examples/geos_demo.py =================================================================== --- trunk/toolkits/basemap/examples/geos_demo.py 2008年08月02日 12:40:17 UTC (rev 5955) +++ trunk/toolkits/basemap/examples/geos_demo.py 2008年08月02日 18:54:32 UTC (rev 5956) @@ -11,7 +11,7 @@ # plot land-sea mask. # land red, oceans blue. # lakes=True means plot inland lakes with ocean color. -m.drawlsmask('red','blue',lakes=True) +m.drawlsmask(land_color='red',ocean_color='blue',lakes=True) # draw parallels and meridians. m.drawparallels(np.arange(-90.,120.,30.)) m.drawmeridians(np.arange(0.,420.,60.)) Modified: trunk/toolkits/basemap/examples/ortho_demo.py =================================================================== --- trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月02日 12:40:17 UTC (rev 5955) +++ trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月02日 18:54:32 UTC (rev 5956) @@ -11,7 +11,7 @@ m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution=None) # land red, oceans blue. # lakes=True means plot inland lakes with ocean color. -m.drawlsmask('red','blue', lakes=True) +m.drawlsmask(land_color='red',ocean_color='blue', lakes=True) # draw parallels and meridians. m.drawparallels(np.arange(-90.,120.,30.)) m.drawmeridians(np.arange(0.,420.,60.)) Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年08月02日 12:40:17 UTC (rev 5955) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年08月02日 18:54:32 UTC (rev 5956) @@ -2940,7 +2940,7 @@ self.set_axes_limits(ax=ax) return retnh,retsh - def drawlsmask(self,land_color,ocean_color,lsmask=None, + def drawlsmask(self,land_color="0.8",ocean_color="w",lsmask=None, lsmask_lons=None,lsmask_lats=None,lakes=False,**kwargs): """ Draw land-sea mask image. @@ -2953,17 +2953,12 @@ .. tabularcolumns:: |l|L| ============== ==================================================== - Arguments Description + Keywords Description ============== ==================================================== land_color desired land color (color name or rgba tuple). + Default gray ("0.8"). ocean_color desired ocean color (color name or rgba tuple). - ============== ==================================================== - - .. tabularcolumns:: |l|L| - - ============== ==================================================== - Keywords Description - ============== ==================================================== + Default white. lakes If True, inland lakes are also colored with ocean_color (default is lakes=False). lsmask An array of 0's for ocean pixels, 1's for This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5955 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5955&view=rev Author: jswhit Date: 2008年08月02日 12:40:17 +0000 (2008年8月02日) Log Message: ----------- fix typo in docstring 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年08月02日 12:38:57 UTC (rev 5954) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年08月02日 12:40:17 UTC (rev 5955) @@ -2956,7 +2956,7 @@ Arguments Description ============== ==================================================== land_color desired land color (color name or rgba tuple). - rgba_ocean desired ocean color (color name or rgba tuple). + ocean_color desired ocean color (color name or rgba tuple). ============== ==================================================== .. tabularcolumns:: |l|L| @@ -2965,7 +2965,7 @@ Keywords Description ============== ==================================================== lakes If True, inland lakes are also colored with - rgba_ocean (default is lakes=False). + ocean_color (default is lakes=False). lsmask An array of 0's for ocean pixels, 1's for land pixels and optionally 2's for inland lake pixels defining a global land-sea mask. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5954 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5954&view=rev Author: jswhit Date: 2008年08月02日 12:38:57 +0000 (2008年8月02日) Log Message: ----------- update Modified Paths: -------------- trunk/toolkits/basemap/doc/README.txt Modified: trunk/toolkits/basemap/doc/README.txt =================================================================== --- trunk/toolkits/basemap/doc/README.txt 2008年08月01日 19:50:48 UTC (rev 5953) +++ trunk/toolkits/basemap/doc/README.txt 2008年08月02日 12:38:57 UTC (rev 5954) @@ -1,9 +1,18 @@ To build docs .... + * install sphinx from svn. + * make _static and sphinxext symlinks here that point to the corresponding directories in the matplotlib doc tree, e.g. ln -s ../../../matplotlib/doc/_static _static ln -s ../../../matplotlib/doc/sphinxext sphinxext -* run make.py. Entry point is build/html/index.html. +* copy matplotlibrc to users/figures, edit to make default figure size 6,6 + instead of 8,6. + +* run 'python make.py html'. Entry point is build/html/index.html. + +* to update on sf site: + cd build + rsync -avz html js...@ma...:/home/groups/m/ma/matplotlib/htdocs/basemap/doc/ -essh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5953 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5953&view=rev Author: jswhit Date: 2008年08月01日 19:50:48 +0000 (2008年8月01日) Log Message: ----------- don't set figure size Modified Paths: -------------- trunk/toolkits/basemap/doc/users/figures/background1.py trunk/toolkits/basemap/doc/users/figures/background2.py trunk/toolkits/basemap/doc/users/figures/background3.py Modified: trunk/toolkits/basemap/doc/users/figures/background1.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background1.py 2008年08月01日 18:44:09 UTC (rev 5952) +++ trunk/toolkits/basemap/doc/users/figures/background1.py 2008年08月01日 19:50:48 UTC (rev 5953) @@ -1,6 +1,5 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt -plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution='c',lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) Modified: trunk/toolkits/basemap/doc/users/figures/background2.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月01日 18:44:09 UTC (rev 5952) +++ trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月01日 19:50:48 UTC (rev 5953) @@ -1,6 +1,5 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt -plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', Modified: trunk/toolkits/basemap/doc/users/figures/background3.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background3.py 2008年08月01日 18:44:09 UTC (rev 5952) +++ trunk/toolkits/basemap/doc/users/figures/background3.py 2008年08月01日 19:50:48 UTC (rev 5953) @@ -1,6 +1,5 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt -plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5952 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5952&view=rev Author: jswhit Date: 2008年08月01日 18:44:09 +0000 (2008年8月01日) Log Message: ----------- eliminate title, make plot a little smaller. Modified Paths: -------------- trunk/toolkits/basemap/doc/users/figures/background1.py trunk/toolkits/basemap/doc/users/figures/background2.py trunk/toolkits/basemap/doc/users/figures/background3.py Modified: trunk/toolkits/basemap/doc/users/figures/background1.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background1.py 2008年08月01日 18:25:38 UTC (rev 5951) +++ trunk/toolkits/basemap/doc/users/figures/background1.py 2008年08月01日 18:44:09 UTC (rev 5952) @@ -1,5 +1,6 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt +plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution='c',lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) @@ -11,5 +12,4 @@ m.drawmapboundary(fill_color='aqua') # fill continents, set lake color same as ocean color. m.fillcontinents(color='coral',lake_color='aqua') -plt.title("Lambert Conformal Projection") plt.savefig('background1.png') Modified: trunk/toolkits/basemap/doc/users/figures/background2.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月01日 18:25:38 UTC (rev 5951) +++ trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月01日 18:44:09 UTC (rev 5952) @@ -1,5 +1,6 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt +plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', @@ -7,5 +8,4 @@ # draw a land-sea mask for a map background. # lakes=True means plot inland lakes with ocean color. m.drawlsmask('coral','aqua',lakes=True) -plt.title("Lambert Conformal Projection") plt.savefig('background2.png') Modified: trunk/toolkits/basemap/doc/users/figures/background3.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background3.py 2008年08月01日 18:25:38 UTC (rev 5951) +++ trunk/toolkits/basemap/doc/users/figures/background3.py 2008年08月01日 18:44:09 UTC (rev 5952) @@ -1,9 +1,9 @@ from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt +plt.figure(figsize=(6,5)) # setup Lambert Conformal basemap. # set resolution=None to skip processing of boundary datasets. m = Basemap(width=12000000,height=9000000,projection='lcc', resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) m.bluemarble() -plt.title("Lambert Conformal Projection") plt.savefig('background3.png') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5951 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5951&view=rev Author: jswhit Date: 2008年08月01日 18:25:38 +0000 (2008年8月01日) Log Message: ----------- update text with examples. Modified Paths: -------------- trunk/toolkits/basemap/doc/users/geography.rst Modified: trunk/toolkits/basemap/doc/users/geography.rst =================================================================== --- trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 18:03:01 UTC (rev 5950) +++ trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 18:25:38 UTC (rev 5951) @@ -33,4 +33,22 @@ world in lat/lon coordinates from the international dateline eastward and the South Pole northward. -.. toctree:: +Here are examples of the three different ways to draw a map background. + +1. Draw coastlines, filling ocean and land areas. + +.. literalinclude:: figures/background1.py + +.. image:: figures/background1.png + +2. Draw a land-sea mask as an image. + +.. literalinclude:: figures/background2.py + +.. image:: figures/background2.png + +3. Draw the NASA 'Blue Marble' image. + +.. literalinclude:: figures/background3.py + +.. image:: figures/background3.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5950 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5950&view=rev Author: jswhit Date: 2008年08月01日 18:03:01 +0000 (2008年8月01日) Log Message: ----------- update lsmask call Modified Paths: -------------- trunk/toolkits/basemap/examples/geos_demo.py Modified: trunk/toolkits/basemap/examples/geos_demo.py =================================================================== --- trunk/toolkits/basemap/examples/geos_demo.py 2008年08月01日 18:00:58 UTC (rev 5949) +++ trunk/toolkits/basemap/examples/geos_demo.py 2008年08月01日 18:03:01 UTC (rev 5950) @@ -9,10 +9,9 @@ fig=plt.figure() m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution=None) # plot land-sea mask. -rgba_land = (0,255,0,255) # land green. -rgba_ocean = (0,0,255,255) # ocean blue. +# land red, oceans blue. # lakes=True means plot inland lakes with ocean color. -m.drawlsmask(rgba_land, rgba_ocean, lakes=True) +m.drawlsmask('red','blue',lakes=True) # draw parallels and meridians. m.drawparallels(np.arange(-90.,120.,30.)) m.drawmeridians(np.arange(0.,420.,60.)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5949 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5949&view=rev Author: jswhit Date: 2008年08月01日 18:00:58 +0000 (2008年8月01日) Log Message: ----------- update docstring Modified Paths: -------------- trunk/toolkits/basemap/examples/ortho_demo.py Modified: trunk/toolkits/basemap/examples/ortho_demo.py =================================================================== --- trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月01日 17:57:59 UTC (rev 5948) +++ trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月01日 18:00:58 UTC (rev 5949) @@ -9,9 +9,7 @@ # map with land/sea mask plotted fig = plt.figure() m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution=None) -# plot land-sea mask. -rgba_land = (0,255,0,255) # land green. -rgba_ocean = (0,0,255,255) # ocean blue. +# land red, oceans blue. # lakes=True means plot inland lakes with ocean color. m.drawlsmask('red','blue', lakes=True) # draw parallels and meridians. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5948 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5948&view=rev Author: jswhit Date: 2008年08月01日 17:57:59 +0000 (2008年8月01日) Log Message: ----------- change drawlsmask method to accept any valid matplotlib color specification. Modified Paths: -------------- trunk/toolkits/basemap/examples/ortho_demo.py trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Added Paths: ----------- trunk/toolkits/basemap/doc/users/figures/background1.py trunk/toolkits/basemap/doc/users/figures/background2.py trunk/toolkits/basemap/doc/users/figures/background3.py Added: trunk/toolkits/basemap/doc/users/figures/background1.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background1.py (rev 0) +++ trunk/toolkits/basemap/doc/users/figures/background1.py 2008年08月01日 17:57:59 UTC (rev 5948) @@ -0,0 +1,15 @@ +from mpl_toolkits.basemap import Basemap +import matplotlib.pyplot as plt +# setup Lambert Conformal basemap. +m = Basemap(width=12000000,height=9000000,projection='lcc', + resolution='c',lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) +# draw coastlines. +m.drawcoastlines() +# draw a boundary around the map, fill the background. +# this background will end up being the ocean color, since +# the continents will be drawn on top. +m.drawmapboundary(fill_color='aqua') +# fill continents, set lake color same as ocean color. +m.fillcontinents(color='coral',lake_color='aqua') +plt.title("Lambert Conformal Projection") +plt.savefig('background1.png') Added: trunk/toolkits/basemap/doc/users/figures/background2.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background2.py (rev 0) +++ trunk/toolkits/basemap/doc/users/figures/background2.py 2008年08月01日 17:57:59 UTC (rev 5948) @@ -0,0 +1,11 @@ +from mpl_toolkits.basemap import Basemap +import matplotlib.pyplot as plt +# setup Lambert Conformal basemap. +# set resolution=None to skip processing of boundary datasets. +m = Basemap(width=12000000,height=9000000,projection='lcc', + resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) +# draw a land-sea mask for a map background. +# lakes=True means plot inland lakes with ocean color. +m.drawlsmask('coral','aqua',lakes=True) +plt.title("Lambert Conformal Projection") +plt.savefig('background2.png') Added: trunk/toolkits/basemap/doc/users/figures/background3.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/background3.py (rev 0) +++ trunk/toolkits/basemap/doc/users/figures/background3.py 2008年08月01日 17:57:59 UTC (rev 5948) @@ -0,0 +1,9 @@ +from mpl_toolkits.basemap import Basemap +import matplotlib.pyplot as plt +# setup Lambert Conformal basemap. +# set resolution=None to skip processing of boundary datasets. +m = Basemap(width=12000000,height=9000000,projection='lcc', + resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) +m.bluemarble() +plt.title("Lambert Conformal Projection") +plt.savefig('background3.png') Modified: trunk/toolkits/basemap/examples/ortho_demo.py =================================================================== --- trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月01日 17:10:38 UTC (rev 5947) +++ trunk/toolkits/basemap/examples/ortho_demo.py 2008年08月01日 17:57:59 UTC (rev 5948) @@ -13,7 +13,7 @@ rgba_land = (0,255,0,255) # land green. rgba_ocean = (0,0,255,255) # ocean blue. # lakes=True means plot inland lakes with ocean color. -m.drawlsmask(rgba_land, rgba_ocean, lakes=True) +m.drawlsmask('red','blue', lakes=True) # draw parallels and meridians. m.drawparallels(np.arange(-90.,120.,30.)) m.drawmeridians(np.arange(0.,420.,60.)) @@ -32,9 +32,9 @@ m.drawmapboundary(fill_color='aqua') # add a map scale. length = 5000 -x1,y1 = 0.2*m.xmax, 0.2*m.ymax +x1,y1 = 0.3*m.xmax, 0.25*m.ymax lon1,lat1 = m(x1,y1,inverse=True) -m.drawmapscale(lon1,lat1,lon_0,lat_0,length,fontsize=8,barstyle='fancy',\ +m.drawmapscale(lon1,lat1,lon1,lat1,length,fontsize=8,barstyle='fancy',\ labelstyle='fancy',units='km') plt.title('Orthographic Map Centered on Lon=%s, Lat=%s' % (lon_0,lat_0)) plt.show() Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年08月01日 17:10:38 UTC (rev 5947) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年08月01日 17:57:59 UTC (rev 5948) @@ -2940,7 +2940,7 @@ self.set_axes_limits(ax=ax) return retnh,retsh - def drawlsmask(self,rgba_land,rgba_ocean,lsmask=None, + def drawlsmask(self,land_color,ocean_color,lsmask=None, lsmask_lons=None,lsmask_lats=None,lakes=False,**kwargs): """ Draw land-sea mask image. @@ -2955,15 +2955,8 @@ ============== ==================================================== Arguments Description ============== ==================================================== - rgba_land rgba integer tuple that describes desired - land color. For example, for green (non-transparent) - land areas, use rgba_land = (0,255,0,255). - rgba_ocean rgba integer tuple that describes desired - ocean color. For example, for blue (non-transparent) - ocean areas, use (0,0,255,255). To make transparent - blue oceans (useful if you just want to mask land - regions over another image), use - rgba_ocean = (0,0,255,0). + land_color desired land color (color name or rgba tuple). + rgba_ocean desired ocean color (color name or rgba tuple). ============== ==================================================== .. tabularcolumns:: |l|L| @@ -2995,6 +2988,22 @@ Extra keyword ``ax`` can be used to override the default axis instance. """ + # convert land and ocean colors to integer rgba tuples with + # values between 0 and 255. + from matplotlib.colors import ColorConverter + c = ColorConverter() + # if conversion fails, assume it's because the color + # given is already an rgba tuple with values between 0 and 255. + try: + cl = c.to_rgba(land_color) + rgba_land = tuple([int(255*x) for x in cl]) + except: + rgba_land = land_color + try: + co = c.to_rgba(ocean_color) + rgba_ocean = tuple([int(255*x) for x in co]) + except: + rgba_ocean = ocean_color # look for axes instance (as keyword, an instance variable # or from plt.gca(). if not kwargs.has_key('ax') and self.ax is None: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5947 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5947&view=rev Author: mdboom Date: 2008年08月01日 17:10:38 +0000 (2008年8月01日) Log Message: ----------- Added Perry's part of Day 2 to outline. Modified Paths: -------------- trunk/py4science/classes/0808_scipy_agenda.txt Modified: trunk/py4science/classes/0808_scipy_agenda.txt =================================================================== --- trunk/py4science/classes/0808_scipy_agenda.txt 2008年08月01日 15:04:46 UTC (rev 5946) +++ trunk/py4science/classes/0808_scipy_agenda.txt 2008年08月01日 17:10:38 UTC (rev 5947) @@ -97,7 +97,7 @@ Day 2 ===== -* basic plotting with matplotlib +* basic plotting with matplotlib (90 min) [Mike] * basic line/scatter plotting * customizing colors, styles * legend @@ -105,7 +105,12 @@ * matplotlibrc * math text -... probably some of Perry's content here ... +* intermediate numpy (90 min) [Perry] + * advanced indexing + * use of where + * zen, examples of vectorizing + * ieee special number and error handling (5 min) + * masked arrays (10-15 min) * advanced plotting with matplotlib * the object-oriented API @@ -115,3 +120,18 @@ * histograms * images * color maps + +* advanced numpy (Below is probably overloaded, will have to cull) (90 min) [Perry] + * memory management (5*10 min) + * memory mapped arrays + * array internals/indexing order issues (10 min) + * general performance issues (5 min) + * record arrays (10 min) + * object arrays (5 min) + * character arrays (5 min) + * interfacing to PIL (5 min) + * standard lib review (fft, random, etc, some of these will be used in examples before this so this seems questionable...) (5 min) + * interfacing to C/C++/Fortran review (10 min) + * no real details, just a survey of different approaches + +* scipy review (45 min?) [preferably Travis can do this, did he respond?] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5946 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5946&view=rev Author: mdboom Date: 2008年08月01日 15:04:46 +0000 (2008年8月01日) Log Message: ----------- Merged revisions 5846-5945 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint ........ r5852 | sameerd | 2008年07月24日 17:56:57 -0400 (2008年7月24日) | 3 lines Fixing edge cases in rec_join in branch ........ r5945 | mdboom | 2008年08月01日 11:00:35 -0400 (2008年8月01日) | 2 lines Backport memory leak fixes in _ttconv.cpp ........ Modified Paths: -------------- trunk/matplotlib/CHANGELOG Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-5845 + /branches/v0_91_maint:1-5945 Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008年08月01日 15:00:35 UTC (rev 5945) +++ trunk/matplotlib/CHANGELOG 2008年08月01日 15:04:46 UTC (rev 5946) @@ -1,3 +1,5 @@ +2008年08月01日 Backported memory leak fixes in _ttconv.cpp - MGD + 2008年07月31日 Added masked array support to griddata. - JSW 2008年07月26日 Added optional C and reduce_C_function arguments to @@ -48,6 +50,9 @@ 2008年07月17日 Fix bug with NaNs at end of path (thanks, Andrew Straw for the report) - MGD +2008年07月16日 Improve error handling in texmanager, thanks to Ian Henry + for reporting - DSD + 2008年07月12日 Added support for external backends with the "module://my_backend" syntax - JDH This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5945 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5945&view=rev Author: mdboom Date: 2008年08月01日 15:00:35 +0000 (2008年8月01日) Log Message: ----------- Backport memory leak fixes in _ttconv.cpp Modified Paths: -------------- branches/v0_91_maint/CHANGELOG branches/v0_91_maint/src/_ttconv.cpp Modified: branches/v0_91_maint/CHANGELOG =================================================================== --- branches/v0_91_maint/CHANGELOG 2008年08月01日 12:19:26 UTC (rev 5944) +++ branches/v0_91_maint/CHANGELOG 2008年08月01日 15:00:35 UTC (rev 5945) @@ -1,3 +1,5 @@ +2008年08月01日 Backported memory leak fixes in _ttconv.cpp - MGD + 2008年07月24日 Deprecated (raise NotImplementedError) all the mlab2 functions from matplotlib.mlab out of concern that some of them were not clean room implementations. JDH @@ -2,3 +4,3 @@ -2008年07月16日 Improve error handling in texmanager, thanks to Ian Henry +2008年07月16日 Improve error handling in texmanager, thanks to Ian Henry for reporting - DSD Modified: branches/v0_91_maint/src/_ttconv.cpp =================================================================== --- branches/v0_91_maint/src/_ttconv.cpp 2008年08月01日 12:19:26 UTC (rev 5944) +++ branches/v0_91_maint/src/_ttconv.cpp 2008年08月01日 15:00:35 UTC (rev 5945) @@ -25,22 +25,23 @@ } ~PythonFileWriter() { - if (_write_method) - Py_DECREF(_write_method); + Py_XDECREF(_write_method); } void set(PyObject* write_method) { - if (_write_method) - Py_DECREF(_write_method); + Py_XDECREF(_write_method); _write_method = write_method; - if (_write_method) - Py_INCREF(_write_method); + Py_XINCREF(_write_method); } virtual void write(const char* a) { - if (_write_method) - if (! PyObject_CallFunction(_write_method, (char *)"s", a)) + PyObject* result = NULL; + if (_write_method) { + result = PyObject_CallFunction(_write_method, (char *)"s", a); + if (! result) throw PythonExceptionOccurred(); + Py_DECREF(result); + } } }; @@ -54,6 +55,7 @@ } file_writer->set(write_method); + Py_DECREF(write_method); return 1; } @@ -68,11 +70,14 @@ PyObject* item; while ( (item = PyIter_Next(iterator)) ) { long value = PyInt_AsLong(item); + Py_DECREF(item); if (value == -1 && PyErr_Occurred()) return 0; result->push_back(value); } + Py_DECREF(iterator); + return 1; } @@ -83,11 +88,11 @@ int fonttype; std::vector<int> glyph_ids; - static const char *kwlist[] = { + static const char *kwlist[] = { "filename", "output", "fonttype", "glyph_ids", NULL }; if (! PyArg_ParseTupleAndKeywords - (args, kwds, - "sO&i|O&:convert_ttf_to_ps", + (args, kwds, + "sO&i|O&:convert_ttf_to_ps", (char**)kwlist, &filename, fileobject_to_PythonFileWriter, @@ -96,9 +101,9 @@ pyiterable_to_vector_int, &glyph_ids)) return NULL; - + if (fonttype != 3 && fonttype != 42) { - PyErr_SetString(PyExc_ValueError, + PyErr_SetString(PyExc_ValueError, "fonttype must be either 3 (raw Postscript) or 42 " "(embedded Truetype)"); return NULL; @@ -109,7 +114,7 @@ } catch (TTException& e) { PyErr_SetString(PyExc_RuntimeError, e.getMessage()); return NULL; - } catch (PythonExceptionOccurred& e) { + } catch (PythonExceptionOccurred& ) { return NULL; } catch (...) { PyErr_SetString(PyExc_RuntimeError, "Unknown C++ exception"); @@ -130,9 +135,13 @@ virtual void add_pair(const char* a, const char* b) { PyObject* value = PyString_FromString(b); - if (value) - if (PyDict_SetItemString(_dict, a, value)) + if (value) { + if (PyDict_SetItemString(_dict, a, value)) { + Py_DECREF(value); throw PythonExceptionOccurred(); + } + } + Py_DECREF(value); } }; @@ -144,8 +153,8 @@ static const char *kwlist[] = { "filename", "glyph_ids", NULL }; if (! PyArg_ParseTupleAndKeywords - (args, kwds, - "s|O&:convert_ttf_to_ps", + (args, kwds, + "s|O&:get_pdf_charprocs", (char **)kwlist, &filename, pyiterable_to_vector_int, @@ -161,11 +170,14 @@ try { ::get_pdf_charprocs( filename, glyph_ids, dict ); } catch (TTException& e) { + Py_DECREF(result); PyErr_SetString(PyExc_RuntimeError, e.getMessage()); return NULL; - } catch (PythonExceptionOccurred& e) { + } catch (PythonExceptionOccurred& ) { + Py_DECREF(result); return NULL; } catch (...) { + Py_DECREF(result); PyErr_SetString(PyExc_RuntimeError, "Unknown C++ exception"); return NULL; } @@ -174,7 +186,7 @@ } static PyMethodDef ttconv_methods[] = { - {"convert_ttf_to_ps", (PyCFunction)convert_ttf_to_ps, METH_KEYWORDS, + {"convert_ttf_to_ps", (PyCFunction)convert_ttf_to_ps, METH_KEYWORDS, "convert_ttf_to_ps(filename, output, fonttype, glyph_ids)\n" "\n" "Converts the Truetype font into a Type 3 or Type 42 Postscript font, " @@ -191,7 +203,7 @@ "then all glyphs will be included. If any of the glyphs specified are " "composite glyphs, then the component glyphs will also be included." }, - {"get_pdf_charprocs", (PyCFunction)py_get_pdf_charprocs, METH_KEYWORDS, + {"get_pdf_charprocs", (PyCFunction)py_get_pdf_charprocs, METH_KEYWORDS, "get_pdf_charprocs(filename, glyph_ids)\n" "\n" "Given a Truetype font file, returns a dictionary containing the PDF Type 3\n" @@ -204,14 +216,14 @@ "the values are the stream content needed to render that glyph. This\n" "is useful to generate the CharProcs dictionary in a PDF Type 3 font.\n" }, - {NULL} /* Sentinel */ + {0, 0, 0, 0} /* Sentinel */ }; #ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ #define PyMODINIT_FUNC void #endif PyMODINIT_FUNC -initttconv(void) +initttconv(void) { PyObject* m; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5944 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5944&view=rev Author: jswhit Date: 2008年08月01日 12:19:26 +0000 (2008年8月01日) Log Message: ----------- fix typo Modified Paths: -------------- trunk/toolkits/basemap/doc/users/geography.rst Modified: trunk/toolkits/basemap/doc/users/geography.rst =================================================================== --- trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 12:18:07 UTC (rev 5943) +++ trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 12:19:26 UTC (rev 5944) @@ -30,7 +30,7 @@ image as a map background. * :func:`~mpl_toolkits.basemap.Basemap.warpimage`: use an abitrary image as a map background. The image must be global, covering the - world in lat/lon cooridinates from dateline to dateline and South - Pole to North Pole. + world in lat/lon coordinates from the international dateline eastward + and the South Pole northward. .. toctree:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5943 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5943&view=rev Author: jswhit Date: 2008年08月01日 12:18:07 +0000 (2008年8月01日) Log Message: ----------- add some more text Modified Paths: -------------- trunk/toolkits/basemap/doc/users/geography.rst Modified: trunk/toolkits/basemap/doc/users/geography.rst =================================================================== --- trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 12:14:29 UTC (rev 5942) +++ trunk/toolkits/basemap/doc/users/geography.rst 2008年08月01日 12:18:07 UTC (rev 5943) @@ -1,7 +1,7 @@ .. _geography: -Drawing Coastlines, Rivers and Political Boundaries -=================================================== +Drawing a Map Background +======================== Basemap includes the `GSSH <http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html>`_ @@ -20,4 +20,17 @@ in North America. * :func:`~mpl_toolkits.basemap.Basemap.drawrivers`: draw rivers. +Instead of drawing coastlines and political boundaries, an image can be +used as a map background. Basemap provides several options for this: + +* :func:`~mpl_toolkits.basemap.Basemap.drawlsmask`: draw a high-resolution + land-sea mask as an image, with land and ocean colors specified. +* :func:`~mpl_toolkits.basemap.Basemap.bluemarble`: draw a NASA + `Blue Marble <http://visibleearth.nasa.gov/view_set.php?categoryID=2363>`_ + image as a map background. +* :func:`~mpl_toolkits.basemap.Basemap.warpimage`: use an abitrary + image as a map background. The image must be global, covering the + world in lat/lon cooridinates from dateline to dateline and South + Pole to North Pole. + .. toctree:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5942 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5942&view=rev Author: dsdale Date: 2008年08月01日 12:14:29 +0000 (2008年8月01日) Log Message: ----------- added backend_fallback to traited config Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/config/mplconfig.py Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py =================================================================== --- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2008年07月31日 19:08:08 UTC (rev 5941) +++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2008年08月01日 12:14:29 UTC (rev 5942) @@ -64,6 +64,7 @@ class backend(TConfig): use = T.Trait('Agg', mplT.BackendHandler()) + fallback = T.Trait(True, mplT.BoolHandler()) class cairo(TConfig): format = T.Trait('png', 'png', 'ps', 'pdf', 'svg') @@ -284,6 +285,7 @@ self.tconfig_map = { 'backend' : (self.tconfig.backend, 'use'), + 'backend_fallback' : (self.tconfig.backend, 'fallback'), 'numerix' : (self.tconfig, 'numerix'), 'maskedarray' : (self.tconfig, 'maskedarray'), 'toolbar' : (self.tconfig, 'toolbar'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.