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
(4)
2
3
(8)
4
(16)
5
(40)
6
(16)
7
(9)
8
(15)
9
(6)
10
(4)
11
(28)
12
(6)
13
(2)
14
(7)
15
(8)
16
17
18
(9)
19
(2)
20
(7)
21
(3)
22
(6)
23
(25)
24
(16)
25
(8)
26
(7)
27
(3)
28
(1)
29
(4)
30
(21)
31
(15)





Showing results of 296

<< < 1 2 3 4 5 .. 12 > >> (Page 3 of 12)
From: <js...@us...> - 2009年08月26日 01:12:49
Revision: 7571
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7571&view=rev
Author: jswhit
Date: 2009年08月26日 01:12:32 +0000 (2009年8月26日)
Log Message:
-----------
added nightshade method
Modified Paths:
--------------
 trunk/toolkits/basemap/Changelog
 trunk/toolkits/basemap/examples/daynight.py
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
 trunk/toolkits/basemap/setup.py
Added Paths:
-----------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog	2009年08月25日 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/Changelog	2009年08月26日 01:12:32 UTC (rev 7571)
@@ -1,3 +1,6 @@
+version 0.99.5 (not yet released)
+ * added 'nightshade' method to shade night regions on a map.
+ * added lonmin, lonmax instance variables.
 version 0.99.4 (svn revision 7332)
 * ax.frame replaced with ax.spines to maintain compatibility 
 with matplotlib spines support.
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月25日 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月26日 01:12:32 UTC (rev 7571)
@@ -1,93 +1,16 @@
 import numpy as np
-from mpl_toolkits.basemap import Basemap, netcdftime
+from mpl_toolkits.basemap import Basemap
 import matplotlib.pyplot as plt
 from datetime import datetime
-from numpy import ma
 
 # example showing how to compute the day/night terminator and shade nightime
 # areas on a map.
-
-def epem(date):
- """
- input: date - datetime object (assumed UTC)
- ouput: gha - Greenwich hour angle, the angle between the Greenwich
- meridian and the meridian containing the subsolar point.
- dec - solar declination.
- """
- dg2rad = np.pi/180.
- rad2dg = 1./dg2rad
- # compute julian day from UTC datetime object.
- jday = netcdftime.JulianDayFromDate(date)
- jd = np.floor(jday) # truncate to integer.
- # utc hour.
- ut = date.hour + date.minute/60. + date.second/3600.
- # calculate number of centuries from J2000
- t = (jd + (ut/24.) - 2451545.0) / 36525.
- # mean longitude corrected for aberration
- l = (280.460 + 36000.770 * t) % 360
- # mean anomaly
- g = 357.528 + 35999.050 * t
- # ecliptic longitude
- lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
- # obliquity of the ecliptic
- ep = 23.4393 - 0.01300 * t
- # equation of time
- eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
- + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
- # Greenwich hour angle
- gha = 15*ut - 180 + eqtime
- # declination of sun
- dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
- return gha, dec
-
-def daynightgrid(date, nlons):
- """
- date is datetime object (assumed UTC).
- nlons is # of longitudes used to compute terminator."""
- dg2rad = np.pi/180.
- lons = np.linspace(-180,180,nlons).astype(np.float32)
- # compute greenwich hour angle and solar declination
- # from datetime object (assumed UTC).
- tau, dec = epem(date) 
- # compute day/night terminator from hour angle, declination.
- longitude = lons + tau
- lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
- # create day/night grid (1 for night, 0 for day)
- nlats = ((nlons-1)/2)+1
- lons2 = np.linspace(-180,180,nlons).astype(np.float32)
- lats2 = np.linspace(-90,90,nlats).astype(np.float32)
- lons2, lats2 = np.meshgrid(lons2,lats2)
- lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
- daynight = np.ones(lons2.shape, np.int8)
- daynight = np.where(lats2>lats,0,daynight)
- daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
- return lons2,lats2,daynight
-
-class Basemap2(Basemap):
- def nightshade(self,date,color="k",nlons=1441,alpha=0.5,zorder=None):
- # create grid of day=0, night=1
- # 1441 means use a 0.25 degree grid.
- lons,lats,daynight = daynightgrid(date,nlons)
- x,y = self(lons,lats)
- # contour the day-night grid, coloring the night area
- # with the specified color and transparency.
- CS = map.contourf(x,y,daynight,1,colors=[color],alpha=alpha)
- # set zorder on ContourSet collections show night shading
- # is on top.
- for c in CS.collections:
- if zorder is None:
- c.set_zorder(c.get_zorder()+1)
- else:
- c.set_zorder(zorder)
- return CS
-
-
 # miller projection 
-map = Basemap2(projection='mill',lon_0=0)
+map = Basemap(projection='mill',lon_0=180)
 # plot coastlines, draw label meridians and parallels.
 map.drawcoastlines()
 map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
-map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
+map.drawmeridians(np.arange(map.lonmin,map.lonmax+30,60),labels=[0,0,0,1])
 # fill continents 'coral' (with zorder=0), color wet areas 'aqua'
 map.drawmapboundary(fill_color='aqua')
 map.fillcontinents(color='coral',lake_color='aqua')
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2009年08月25日 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2009年08月26日 01:12:32 UTC (rev 7571)
@@ -53,7 +53,7 @@
 else:
 basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
 
-__version__ = '0.99.4'
+__version__ = '0.99.5'
 
 # supported map projections.
 _projnames = {'cyl' : 'Cylindrical Equidistant',
@@ -3421,6 +3421,42 @@
 raise KeyError("barstyle must be 'simple' or 'fancy'")
 return rets
 
+ def nightshade(self,date,color="k",delta=0.25,alpha=0.5,ax=None,zorder=2):
+ """
+ Shade the regions of the map that are in darkness at the time
+ specifed by ``date``. ``date`` is a datetime instance,
+ assumed to be UTC.
+
+ .. tabularcolumns:: |l|L|
+
+ ============== ====================================================
+ Keywords Description
+ ============== ====================================================
+ color color to shade night regions (default black).
+ delta day/night terminator is computed with a
+ a resolution of ``delta`` degrees (default 0.25).
+ alpha alpha transparency for shading (default 0.5, so
+ map background shows through).
+ zorder zorder for shading (default 2).
+ ============== ====================================================
+
+ Extra keyword ``ax`` can be used to override the default axis instance.
+
+ returns a matplotlib.contour.ContourSet instance.
+ """
+ from solar import daynight_grid
+ # create grid of day=0, night=1
+ lons,lats,daynight = daynight_grid(date,delta,self.lonmin,self.lonmax)
+ x,y = self(lons,lats)
+ # contour the day-night grid, coloring the night area
+ # with the specified color and transparency.
+ CS = self.contourf(x,y,daynight,1,colors=[color],alpha=alpha,ax=ax)
+ # set zorder on ContourSet collections show night shading
+ # is on top.
+ for c in CS.collections:
+ c.set_zorder(zorder)
+ return CS
+
 def _check_ax(self):
 """
 Returns the axis on which to draw.
Added: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py	 (rev 0)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py	2009年08月26日 01:12:32 UTC (rev 7571)
@@ -0,0 +1,66 @@
+# some simple functions to calculate solar position, day-night terminator
+import numpy as np
+from numpy import ma
+import netcdftime
+
+def epem(date):
+ """
+ input: date - datetime object (assumed UTC)
+ ouput: gha - Greenwich hour angle, the angle between the Greenwich
+ meridian and the meridian containing the subsolar point.
+ dec - solar declination.
+ """
+ dg2rad = np.pi/180.
+ rad2dg = 1./dg2rad
+ # compute julian day from UTC datetime object.
+ jday = netcdftime.JulianDayFromDate(date)
+ jd = np.floor(jday) # truncate to integer.
+ # utc hour.
+ ut = date.hour + date.minute/60. + date.second/3600.
+ # calculate number of centuries from J2000
+ t = (jd + (ut/24.) - 2451545.0) / 36525.
+ # mean longitude corrected for aberration
+ l = (280.460 + 36000.770 * t) % 360
+ # mean anomaly
+ g = 357.528 + 35999.050 * t
+ # ecliptic longitude
+ lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
+ # obliquity of the ecliptic
+ ep = 23.4393 - 0.01300 * t
+ # equation of time
+ eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
+ + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
+ # Greenwich hour angle
+ gha = 15*ut - 180 + eqtime
+ # declination of sun
+ dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
+ return gha, dec
+
+def daynight_terminator(date, delta, lonmin, lonmax):
+ """
+ date is datetime object (assumed UTC).
+ nlons is # of longitudes used to compute terminator."""
+ dg2rad = np.pi/180.
+ lons = np.arange(lonmin,lonmax+0.5*delta,delta,dtype=np.float32)
+ # compute greenwich hour angle and solar declination
+ # from datetime object (assumed UTC).
+ tau, dec = epem(date) 
+ # compute day/night terminator from hour angle, declination.
+ longitude = lons + tau
+ lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
+ return lons, lats
+
+def daynight_grid(date, delta, lonmin, lonmax):
+ """
+ date is datetime object (assumed UTC).
+ delta is the grid interval (in degrees) used to compute terminator."""
+ lons, lats = daynight_terminator(date, delta, lonmin, lonmax)
+ # create day/night grid (1 for night, 0 for day)
+ lats2 = np.arange(-90,90+0.5*delta,delta,dtype=np.float32)
+ nlons = len(lons); nlats = len(lats2)
+ lons2, lats2 = np.meshgrid(lons,lats2)
+ lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
+ daynight = np.ones(lons2.shape, np.int8)
+ daynight = np.where(lats2>lats,0,daynight)
+ daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
+ return lons2,lats2,daynight
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py	2009年08月25日 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/setup.py	2009年08月26日 01:12:32 UTC (rev 7571)
@@ -225,7 +225,7 @@
 package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
 setup(
 name = "basemap",
- version = "0.99.4",
+ version = "0.99.5",
 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.
From: <md...@us...> - 2009年08月25日 20:06:25
Revision: 7570
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7570&view=rev
Author: mdboom
Date: 2009年08月25日 20:06:13 +0000 (2009年8月25日)
Log Message:
-----------
Merged revisions 7569 via svnmerge from 
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint
........
 r7569 | mdboom | 2009年08月25日 16:04:34 -0400 (2009年8月25日) | 2 lines
 
 Fix cohere_pairs docstring so it builds with new versions of Sphinx
........
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/mlab.py
Property Changed:
----------------
 trunk/matplotlib/
 trunk/matplotlib/doc/pyplots/README
 trunk/matplotlib/doc/sphinxext/gen_gallery.py
 trunk/matplotlib/doc/sphinxext/gen_rst.py
 trunk/matplotlib/examples/misc/multiprocess.py
 trunk/matplotlib/examples/mplot3d/contour3d_demo.py
 trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
 trunk/matplotlib/examples/mplot3d/polys3d_demo.py
 trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
 trunk/matplotlib/examples/mplot3d/surface3d_demo.py
 trunk/matplotlib/examples/mplot3d/wire3d_demo.py
 trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
 trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
 trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
 - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7567
 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7569
Modified: svn:mergeinfo
 - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/misc/multiprocess.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py	2009年08月25日 20:04:34 UTC (rev 7569)
+++ trunk/matplotlib/lib/matplotlib/mlab.py	2009年08月25日 20:06:13 UTC (rev 7570)
@@ -497,77 +497,80 @@
 returnPxx=False):
 
 u"""
- Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
+ Call signature::
 
- Compute the coherence and phase for all pairs ij, in X.
+ Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
 
- Parameters
- ----------
- X: array
- a numSamples*numCols array
+ Compute the coherence and phase for all pairs *ij*, in *X*.
 
- ij: list of tuples
- Each tuple is a pair of indexes into the columns of X for which you want to
- compute coherence. For example, if X has 64 columns, and you want to
- compute all nonredundant pairs, define ij as
+ *X* is a *numSamples* * *numCols* array
 
+ *ij* is a list of tuples. Each tuple is a pair of indexes into
+ the columns of X for which you want to compute coherence. For
+ example, if *X* has 64 columns, and you want to compute all
+ nonredundant pairs, define *ij* as::
+
 ij = []
 for i in range(64):
 for j in range(i+1,64):
 ij.append( (i,j) )
 
- preferSpeedOverMemory: optional, bool
+ *preferSpeedOverMemory* is an optional bool. Defaults to true. If
+ False, limits the caching by only making one, rather than two,
+ complex cache arrays. This is useful if memory becomes critical.
+ Even when *preferSpeedOverMemory* is False, :func:`cohere_pairs`
+ will still give significant performace gains over calling
+ :func:`cohere` for each pair, and will use subtantially less
+ memory than if *preferSpeedOverMemory* is True. In my tests with
+ a 43000,64 array over all nonredundant pairs,
+ *preferSpeedOverMemory* = True delivered a 33% performance boost
+ on a 1.7GHZ Athlon with 512MB RAM compared with
+ *preferSpeedOverMemory* = False. But both solutions were more
+ than 10x faster than naively crunching all possible pairs through
+ :func:`cohere`.
 
- Defaults to true. If false, limits the caching by only making one, rather
- than two, complex cache arrays. This is useful if memory becomes critical.
- Even when preferSpeedOverMemory is false, cohere_pairs will still give
- significant performace gains over calling cohere for each pair, and will
- use subtantially less memory than if preferSpeedOverMemory is true. In my
- tests with a 43000,64 array over all nonredundant pairs,
- preferSpeedOverMemory=1 delivered a 33% performace boost on a 1.7GHZ Athlon
- with 512MB RAM compared with preferSpeedOverMemory=0. But both solutions
- were more than 10x faster than naievly crunching all possible pairs through
- cohere.
- 
- Returns
- -------
+ Returns::
 
- (Cxy, Phase, freqs), where: 
- 
- Cxy: dictionary of (i,j) tuples -> coherence vector for that
- pair. Ie, Cxy[(i,j) = cohere(X[:,i], X[:,j]). Number of
- dictionary keys is len(ij)
+ (Cxy, Phase, freqs)
 
- Phase: dictionary of phases of the cross spectral density at
- each frequency for each pair. keys are (i,j).
+ where:
 
- freqs: vector of frequencies, equal in length to either the
- coherence or phase vectors for any i,j key.
+ - *Cxy*: dictionary of (*i*, *j*) tuples -> coherence vector for
+ that pair. I.e., ``Cxy[(i,j) = cohere(X[:,i], X[:,j])``.
+ Number of dictionary keys is ``len(ij)``.
 
- Eg, to make a coherence Bode plot:
+ - *Phase*: dictionary of phases of the cross spectral density at
+ each frequency for each pair. Keys are (*i*, *j*).
 
+ - *freqs*: vector of frequencies, equal in length to either the
+ coherence or phase vectors for any (*i*, *j*) key.
+
+ Eg., to make a coherence Bode plot::
+
 subplot(211)
 plot( freqs, Cxy[(12,19)])
 subplot(212)
 plot( freqs, Phase[(12,19)])
 
- For a large number of pairs, cohere_pairs can be much more
- efficient than just calling cohere for each pair, because it
- caches most of the intensive computations. If N is the number of
- pairs, this function is O(N) for most of the heavy lifting,
- whereas calling cohere for each pair is O(N^2). However, because
- of the caching, it is also more memory intensive, making 2
- additional complex arrays with approximately the same number of
- elements as X.
+ For a large number of pairs, :func:`cohere_pairs` can be much more
+ efficient than just calling :func:`cohere` for each pair, because
+ it caches most of the intensive computations. If :math:`N` is the
+ number of pairs, this function is :math:`O(N)` for most of the
+ heavy lifting, whereas calling cohere for each pair is
+ :math:`O(N^2)`. However, because of the caching, it is also more
+ memory intensive, making 2 additional complex arrays with
+ approximately the same number of elements as *X*.
 
- See test/cohere_pairs_test.py in the src tree for an example
- script that shows that this cohere_pairs and cohere give the same
- results for a given pair.
+ See :file:`test/cohere_pairs_test.py` in the src tree for an
+ example script that shows that this :func:`cohere_pairs` and
+ :func:`cohere` give the same results for a given pair.
 
- See also 
- --------
- :func: psd
- """ 
+ .. sealso::
+
+ :func:`psd`
+ For information about the methods used to compute
+ :math:`P_{xy}`, :math:`P_{xx}` and :math:`P_{yy}`.
+ """
 numRows, numCols = X.shape
 
 # zero pad if X is too short
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
 + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2009年08月25日 20:04:41
Revision: 7569
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7569&view=rev
Author: mdboom
Date: 2009年08月25日 20:04:34 +0000 (2009年8月25日)
Log Message:
-----------
Fix cohere_pairs docstring so it builds with new versions of Sphinx
Modified Paths:
--------------
 branches/v0_99_maint/lib/matplotlib/mlab.py
Modified: branches/v0_99_maint/lib/matplotlib/mlab.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/mlab.py	2009年08月25日 15:32:13 UTC (rev 7568)
+++ branches/v0_99_maint/lib/matplotlib/mlab.py	2009年08月25日 20:04:34 UTC (rev 7569)
@@ -501,77 +501,80 @@
 returnPxx=False):
 
 u"""
- Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
+ Call signature::
 
- Compute the coherence and phase for all pairs ij, in X.
+ Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
 
- Parameters
- ----------
- X: array
- a numSamples*numCols array
+ Compute the coherence and phase for all pairs *ij*, in *X*.
 
- ij: list of tuples
- Each tuple is a pair of indexes into the columns of X for which you want to
- compute coherence. For example, if X has 64 columns, and you want to
- compute all nonredundant pairs, define ij as
+ *X* is a *numSamples* * *numCols* array
 
+ *ij* is a list of tuples. Each tuple is a pair of indexes into
+ the columns of X for which you want to compute coherence. For
+ example, if *X* has 64 columns, and you want to compute all
+ nonredundant pairs, define *ij* as::
+
 ij = []
 for i in range(64):
 for j in range(i+1,64):
 ij.append( (i,j) )
 
- preferSpeedOverMemory: optional, bool
+ *preferSpeedOverMemory* is an optional bool. Defaults to true. If
+ False, limits the caching by only making one, rather than two,
+ complex cache arrays. This is useful if memory becomes critical.
+ Even when *preferSpeedOverMemory* is False, :func:`cohere_pairs`
+ will still give significant performace gains over calling
+ :func:`cohere` for each pair, and will use subtantially less
+ memory than if *preferSpeedOverMemory* is True. In my tests with
+ a 43000,64 array over all nonredundant pairs,
+ *preferSpeedOverMemory* = True delivered a 33% performance boost
+ on a 1.7GHZ Athlon with 512MB RAM compared with
+ *preferSpeedOverMemory* = False. But both solutions were more
+ than 10x faster than naively crunching all possible pairs through
+ :func:`cohere`.
 
- Defaults to true. If false, limits the caching by only making one, rather
- than two, complex cache arrays. This is useful if memory becomes critical.
- Even when preferSpeedOverMemory is false, cohere_pairs will still give
- significant performace gains over calling cohere for each pair, and will
- use subtantially less memory than if preferSpeedOverMemory is true. In my
- tests with a 43000,64 array over all nonredundant pairs,
- preferSpeedOverMemory=1 delivered a 33% performace boost on a 1.7GHZ Athlon
- with 512MB RAM compared with preferSpeedOverMemory=0. But both solutions
- were more than 10x faster than naievly crunching all possible pairs through
- cohere.
- 
- Returns
- -------
+ Returns::
 
- (Cxy, Phase, freqs), where: 
- 
- Cxy: dictionary of (i,j) tuples -> coherence vector for that
- pair. Ie, Cxy[(i,j) = cohere(X[:,i], X[:,j]). Number of
- dictionary keys is len(ij)
+ (Cxy, Phase, freqs)
 
- Phase: dictionary of phases of the cross spectral density at
- each frequency for each pair. keys are (i,j).
+ where:
 
- freqs: vector of frequencies, equal in length to either the
- coherence or phase vectors for any i,j key.
+ - *Cxy*: dictionary of (*i*, *j*) tuples -> coherence vector for
+ that pair. I.e., ``Cxy[(i,j) = cohere(X[:,i], X[:,j])``.
+ Number of dictionary keys is ``len(ij)``.
 
- Eg, to make a coherence Bode plot:
+ - *Phase*: dictionary of phases of the cross spectral density at
+ each frequency for each pair. Keys are (*i*, *j*).
 
+ - *freqs*: vector of frequencies, equal in length to either the
+ coherence or phase vectors for any (*i*, *j*) key.
+
+ Eg., to make a coherence Bode plot::
+
 subplot(211)
 plot( freqs, Cxy[(12,19)])
 subplot(212)
 plot( freqs, Phase[(12,19)])
 
- For a large number of pairs, cohere_pairs can be much more
- efficient than just calling cohere for each pair, because it
- caches most of the intensive computations. If N is the number of
- pairs, this function is O(N) for most of the heavy lifting,
- whereas calling cohere for each pair is O(N^2). However, because
- of the caching, it is also more memory intensive, making 2
- additional complex arrays with approximately the same number of
- elements as X.
+ For a large number of pairs, :func:`cohere_pairs` can be much more
+ efficient than just calling :func:`cohere` for each pair, because
+ it caches most of the intensive computations. If :math:`N` is the
+ number of pairs, this function is :math:`O(N)` for most of the
+ heavy lifting, whereas calling cohere for each pair is
+ :math:`O(N^2)`. However, because of the caching, it is also more
+ memory intensive, making 2 additional complex arrays with
+ approximately the same number of elements as *X*.
 
- See test/cohere_pairs_test.py in the src tree for an example
- script that shows that this cohere_pairs and cohere give the same
- results for a given pair.
+ See :file:`test/cohere_pairs_test.py` in the src tree for an
+ example script that shows that this :func:`cohere_pairs` and
+ :func:`cohere` give the same results for a given pair.
 
- See also 
- --------
- :func: psd
- """ 
+ .. sealso::
+
+ :func:`psd`
+ For information about the methods used to compute
+ :math:`P_{xy}`, :math:`P_{xx}` and :math:`P_{yy}`.
+ """
 numRows, numCols = X.shape
 
 # zero pad if X is too short
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: Eric F. <ef...@ha...> - 2009年08月25日 18:28:01
md...@us... wrote:
> Revision: 7567
> http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7567&view=rev
> Author: mdboom
> Date: 2009年08月25日 15:31:10 +0000 (2009年8月25日)
> 
> Log Message:
> -----------
> Support Line2D objects without associated Axes objects.
> 
> Modified Paths:
> --------------
> branches/v0_99_maint/lib/matplotlib/lines.py
> 
> Modified: branches/v0_99_maint/lib/matplotlib/lines.py
> ===================================================================
> --- branches/v0_99_maint/lib/matplotlib/lines.py	2009年08月25日 11:54:24 UTC (rev 7566)
> +++ branches/v0_99_maint/lib/matplotlib/lines.py	2009年08月25日 15:31:10 UTC (rev 7567)
> @@ -459,7 +459,7 @@
> self._y = self._xy[:, 1] # just a view
> 
> self._subslice = False
> - if len(x) > 100 and self._is_sorted(x):
> + if self.axes and len(x) > 100 and self._is_sorted(x):
> self._subslice = True
> if hasattr(self, '_path'):
> interpolation_steps = self._path._interpolation_steps
> @@ -496,7 +496,7 @@
> def draw(self, renderer):
> if self._invalid:
> self.recache()
> - if self._subslice:
> + if self._subslice and self.axes:
> # Need to handle monotonically decreasing case also...
> x0, x1 = self.axes.get_xbound()
> i0, = self._x.searchsorted([x0], 'left')
Mike,
I'm curious--why are both changes needed? Shouldn't the setting of 
self._subslice in the first chunk be enough? If not, it suggests that 
there are more general design problems here. Can a line object have an 
associated axes when it is created (or when data are fed to it) and then 
lose that axes attribute by the time draw() is called? If so, then it 
seems like the second chunk is the right one to keep, and the first one 
is useless.
Eric
From: <md...@us...> - 2009年08月25日 15:32:19
Revision: 7568
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7568&view=rev
Author: mdboom
Date: 2009年08月25日 15:32:13 +0000 (2009年8月25日)
Log Message:
-----------
Merged revisions 7567 via svnmerge from 
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint
........
 r7567 | mdboom | 2009年08月25日 11:31:10 -0400 (2009年8月25日) | 2 lines
 
 Support Line2D objects without associated Axes objects.
........
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/lines.py
Property Changed:
----------------
 trunk/matplotlib/
 trunk/matplotlib/doc/pyplots/README
 trunk/matplotlib/doc/sphinxext/gen_gallery.py
 trunk/matplotlib/doc/sphinxext/gen_rst.py
 trunk/matplotlib/examples/misc/multiprocess.py
 trunk/matplotlib/examples/mplot3d/contour3d_demo.py
 trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
 trunk/matplotlib/examples/mplot3d/polys3d_demo.py
 trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
 trunk/matplotlib/examples/mplot3d/surface3d_demo.py
 trunk/matplotlib/examples/mplot3d/wire3d_demo.py
 trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
 trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
 trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
 - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7541
 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7567
Modified: svn:mergeinfo
 - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/misc/multiprocess.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2009年08月25日 15:31:10 UTC (rev 7567)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2009年08月25日 15:32:13 UTC (rev 7568)
@@ -453,7 +453,7 @@
 self._y = self._xy[:, 1] # just a view
 
 self._subslice = False
- if len(x) > 100 and self._is_sorted(x):
+ if self.axes and len(x) > 100 and self._is_sorted(x):
 self._subslice = True
 if hasattr(self, '_path'):
 interpolation_steps = self._path._interpolation_steps
@@ -490,7 +490,7 @@
 def draw(self, renderer):
 if self._invalid:
 self.recache()
- if self._subslice:
+ if self._subslice and self.axes:
 # Need to handle monotonically decreasing case also...
 x0, x1 = self.axes.get_xbound()
 i0, = self._x.searchsorted([x0], 'left')
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
 - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
 + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2009年08月25日 15:31:19
Revision: 7567
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7567&view=rev
Author: mdboom
Date: 2009年08月25日 15:31:10 +0000 (2009年8月25日)
Log Message:
-----------
Support Line2D objects without associated Axes objects.
Modified Paths:
--------------
 branches/v0_99_maint/lib/matplotlib/lines.py
Modified: branches/v0_99_maint/lib/matplotlib/lines.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/lines.py	2009年08月25日 11:54:24 UTC (rev 7566)
+++ branches/v0_99_maint/lib/matplotlib/lines.py	2009年08月25日 15:31:10 UTC (rev 7567)
@@ -459,7 +459,7 @@
 self._y = self._xy[:, 1] # just a view
 
 self._subslice = False
- if len(x) > 100 and self._is_sorted(x):
+ if self.axes and len(x) > 100 and self._is_sorted(x):
 self._subslice = True
 if hasattr(self, '_path'):
 interpolation_steps = self._path._interpolation_steps
@@ -496,7 +496,7 @@
 def draw(self, renderer):
 if self._invalid:
 self.recache()
- if self._subslice:
+ if self._subslice and self.axes:
 # Need to handle monotonically decreasing case also...
 x0, x1 = self.axes.get_xbound()
 i0, = self._x.searchsorted([x0], 'left')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7566
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7566&view=rev
Author: jswhit
Date: 2009年08月25日 11:54:24 +0000 (2009年8月25日)
Log Message:
-----------
add lonmin, lonmax instance vars
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	2009年08月25日 02:15:45 UTC (rev 7565)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2009年08月25日 11:54:24 UTC (rev 7566)
@@ -737,13 +737,19 @@
 if projection in _cylproj:
 self.latmin = self.llcrnrlat
 self.latmax = self.urcrnrlat
+ self.lonmin = self.llcrnrlon
+ self.lonmax = self.urcrnrlon
 elif projection in ['ortho','geos'] + _pseudocyl:
 self.latmin = -90.
 self.latmax = 90.
+ self.lonmin = self.llcrnrlon
+ self.lonmax = self.urcrnrlon
 else:
- lons, lats = self.makegrid(101,101)
+ lons, lats = self.makegrid(1001,1001)
 self.latmin = lats.min()
 self.latmax = lats.max()
+ self.lonmin = lons.min()
+ self.lonmax = lons.max()
 
 # if ax == None, pyplot.gca may be used.
 self.ax = ax
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月25日 02:15:54
Revision: 7565
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7565&view=rev
Author: jswhit
Date: 2009年08月25日 02:15:45 +0000 (2009年8月25日)
Log Message:
-----------
change default color
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月25日 00:42:54 UTC (rev 7564)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月25日 02:15:45 UTC (rev 7565)
@@ -64,7 +64,7 @@
 return lons2,lats2,daynight
 
 class Basemap2(Basemap):
- def nightshade(self,date,color="0.5",nlons=1441,alpha=0.5,zorder=None):
+ def nightshade(self,date,color="k",nlons=1441,alpha=0.5,zorder=None):
 # create grid of day=0, night=1
 # 1441 means use a 0.25 degree grid.
 lons,lats,daynight = daynightgrid(date,nlons)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月25日 00:43:07
Revision: 7564
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7564&view=rev
Author: jswhit
Date: 2009年08月25日 00:42:54 +0000 (2009年8月25日)
Log Message:
-----------
fix errors introduced by previous commit
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 23:32:07 UTC (rev 7563)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月25日 00:42:54 UTC (rev 7564)
@@ -20,7 +20,7 @@
 jday = netcdftime.JulianDayFromDate(date)
 jd = np.floor(jday) # truncate to integer.
 # utc hour.
- ut = d.hour + d.minute/60. + d.second/3600.
+ ut = date.hour + date.minute/60. + date.second/3600.
 # calculate number of centuries from J2000
 t = (jd + (ut/24.) - 2451545.0) / 36525.
 # mean longitude corrected for aberration
@@ -94,6 +94,7 @@
 # shade the night areas gray, with alpha transparency so the 
 # map shows through.
 # use current time in UTC.
-CS=map.nightshade(datetime.utcnow())
-plt.title('Day/Night Map for %s (UTC)' %d )
+date = datetime.utcnow()
+CS=map.nightshade(date)
+plt.title('Day/Night Map for %s (UTC)' % date)
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 23:32:16
Revision: 7563
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7563&view=rev
Author: jswhit
Date: 2009年08月24日 23:32:07 +0000 (2009年8月24日)
Log Message:
-----------
pass date to nightshade method
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:45:15 UTC (rev 7562)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 23:32:07 UTC (rev 7563)
@@ -64,10 +64,10 @@
 return lons2,lats2,daynight
 
 class Basemap2(Basemap):
- def nightshade(self,color="0.5",nlons=1441,alpha=0.5,zorder=None):
+ def nightshade(self,date,color="0.5",nlons=1441,alpha=0.5,zorder=None):
 # create grid of day=0, night=1
 # 1441 means use a 0.25 degree grid.
- lons,lats,daynight = daynightgrid(d,nlons)
+ lons,lats,daynight = daynightgrid(date,nlons)
 x,y = self(lons,lats)
 # contour the day-night grid, coloring the night area
 # with the specified color and transparency.
@@ -81,8 +81,6 @@
 c.set_zorder(zorder)
 return CS
 
-# current time in UTC.
-d = datetime.utcnow()
 
 # miller projection 
 map = Basemap2(projection='mill',lon_0=0)
@@ -95,6 +93,7 @@
 map.fillcontinents(color='coral',lake_color='aqua')
 # shade the night areas gray, with alpha transparency so the 
 # map shows through.
-CS=map.nightshade()
+# use current time in UTC.
+CS=map.nightshade(datetime.utcnow())
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 23:14:11
Revision: 7560
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7560&view=rev
Author: jswhit
Date: 2009年08月24日 22:20:10 +0000 (2009年8月24日)
Log Message:
-----------
make night area darker.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:18:05 UTC (rev 7559)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:20:10 UTC (rev 7560)
@@ -81,6 +81,6 @@
 x,y = map(lons, lats)
 # contour this grid with 1 contour level, specifying color for night areas.
 # Use alpha transparency so map shows through.
-CS=map.contourf(x,y,daynight,1,colors=['0.7'],alpha=0.5)
+CS=map.contourf(x,y,daynight,1,colors=['0.5'],alpha=0.5)
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 23:13:13
Revision: 7559
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7559&view=rev
Author: jswhit
Date: 2009年08月24日 22:18:05 +0000 (2009年8月24日)
Log Message:
-----------
use masked array for daynight grid
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 21:28:00 UTC (rev 7558)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:18:05 UTC (rev 7559)
@@ -1,7 +1,8 @@
 import numpy as np
-from mpl_toolkits.basemap import Basemap, netcdftime
+from mpl_toolkits.basemap import Basemap, netcdftime, shiftgrid
 import matplotlib.pyplot as plt
 from datetime import datetime
+from numpy import ma
 
 # example showing how to compute the day/night terminator and shade nightime
 # areas on a map.
@@ -59,6 +60,7 @@
 lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
 daynight = np.ones(lons2.shape, np.int8)
 daynight = np.where(lats2>lats,0,daynight)
+ daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
 return lons2,lats2,daynight
 
 # current time in UTC.
@@ -77,9 +79,8 @@
 # 1441 means use a 0.25 degree grid.
 lons,lats,daynight = daynightgrid(d,1441)
 x,y = map(lons, lats)
-# contour this grid with 1 contour level, specifying colors.
-# (gray for night, white for day). Use alpha transparency so
-# map shows through.
-CS=map.contourf(x,y,daynight,1,colors=['white','0.7'],alpha=0.5)
+# contour this grid with 1 contour level, specifying color for night areas.
+# Use alpha transparency so map shows through.
+CS=map.contourf(x,y,daynight,1,colors=['0.7'],alpha=0.5)
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 22:45:22
Revision: 7562
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7562&view=rev
Author: jswhit
Date: 2009年08月24日 22:45:15 +0000 (2009年8月24日)
Log Message:
-----------
add zorder keyword to nightshade
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:34:25 UTC (rev 7561)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:45:15 UTC (rev 7562)
@@ -64,14 +64,22 @@
 return lons2,lats2,daynight
 
 class Basemap2(Basemap):
- def nightshade(self,color="0.5",nlons=1441,alpha=0.5):
+ def nightshade(self,color="0.5",nlons=1441,alpha=0.5,zorder=None):
 # create grid of day=0, night=1
 # 1441 means use a 0.25 degree grid.
 lons,lats,daynight = daynightgrid(d,nlons)
 x,y = self(lons,lats)
 # contour the day-night grid, coloring the night area
 # with the specified color and transparency.
- return map.contourf(x,y,daynight,1,colors=[color],alpha=alpha)
+ CS = map.contourf(x,y,daynight,1,colors=[color],alpha=alpha)
+ # set zorder on ContourSet collections show night shading
+ # is on top.
+ for c in CS.collections:
+ if zorder is None:
+ c.set_zorder(c.get_zorder()+1)
+ else:
+ c.set_zorder(zorder)
+ return CS
 
 # current time in UTC.
 d = datetime.utcnow()
@@ -84,9 +92,9 @@
 map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
 # fill continents 'coral' (with zorder=0), color wet areas 'aqua'
 map.drawmapboundary(fill_color='aqua')
-map.fillcontinents(color='coral',lake_color='aqua',zorder=0)
+map.fillcontinents(color='coral',lake_color='aqua')
 # shade the night areas gray, with alpha transparency so the 
 # map shows through.
-map.nightshade(color="0.5",nlons=1441,alpha=0.5)
+CS=map.nightshade()
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 22:34:40
Revision: 7561
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7561&view=rev
Author: jswhit
Date: 2009年08月24日 22:34:25 +0000 (2009年8月24日)
Log Message:
-----------
add nightshade method to Basemap base class.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:20:10 UTC (rev 7560)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 22:34:25 UTC (rev 7561)
@@ -1,5 +1,5 @@
 import numpy as np
-from mpl_toolkits.basemap import Basemap, netcdftime, shiftgrid
+from mpl_toolkits.basemap import Basemap, netcdftime
 import matplotlib.pyplot as plt
 from datetime import datetime
 from numpy import ma
@@ -63,11 +63,21 @@
 daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
 return lons2,lats2,daynight
 
+class Basemap2(Basemap):
+ def nightshade(self,color="0.5",nlons=1441,alpha=0.5):
+ # create grid of day=0, night=1
+ # 1441 means use a 0.25 degree grid.
+ lons,lats,daynight = daynightgrid(d,nlons)
+ x,y = self(lons,lats)
+ # contour the day-night grid, coloring the night area
+ # with the specified color and transparency.
+ return map.contourf(x,y,daynight,1,colors=[color],alpha=alpha)
+
 # current time in UTC.
 d = datetime.utcnow()
 
 # miller projection 
-map = Basemap(projection='mill',lon_0=0)
+map = Basemap2(projection='mill',lon_0=0)
 # plot coastlines, draw label meridians and parallels.
 map.drawcoastlines()
 map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
@@ -75,12 +85,8 @@
 # fill continents 'coral' (with zorder=0), color wet areas 'aqua'
 map.drawmapboundary(fill_color='aqua')
 map.fillcontinents(color='coral',lake_color='aqua',zorder=0)
-# create grid of day=0, night=1
-# 1441 means use a 0.25 degree grid.
-lons,lats,daynight = daynightgrid(d,1441)
-x,y = map(lons, lats)
-# contour this grid with 1 contour level, specifying color for night areas.
-# Use alpha transparency so map shows through.
-CS=map.contourf(x,y,daynight,1,colors=['0.5'],alpha=0.5)
+# shade the night areas gray, with alpha transparency so the 
+# map shows through.
+map.nightshade(color="0.5",nlons=1441,alpha=0.5)
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 21:28:10
Revision: 7558
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7558&view=rev
Author: jswhit
Date: 2009年08月24日 21:28:00 +0000 (2009年8月24日)
Log Message:
-----------
made daynightgrid function more efficient
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 21:03:17 UTC (rev 7557)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 21:28:00 UTC (rev 7558)
@@ -43,20 +43,22 @@
 """
 date is datetime object (assumed UTC).
 nlons is # of longitudes used to compute terminator."""
- nlats = ((nlons-1)/2)+1
 dg2rad = np.pi/180.
- lons = np.linspace(-180,180,nlons)
+ lons = np.linspace(-180,180,nlons).astype(np.float32)
 # compute greenwich hour angle and solar declination
 # from datetime object (assumed UTC).
 tau, dec = epem(date) 
+ # compute day/night terminator from hour angle, declination.
 longitude = lons + tau
 lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
- lons2 = np.linspace(-180,180,nlons)
- lats2 = np.linspace(-90,90,nlats)
+ # create day/night grid (1 for night, 0 for day)
+ nlats = ((nlons-1)/2)+1
+ lons2 = np.linspace(-180,180,nlons).astype(np.float32)
+ lats2 = np.linspace(-90,90,nlats).astype(np.float32)
 lons2, lats2 = np.meshgrid(lons2,lats2)
- daynight = np.ones(lons2.shape, np.float)
- for nlon in range(nlons):
- daynight[:,nlon] = np.where(lats2[:,nlon]>lats[nlon],0,daynight[:,nlon])
+ lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
+ daynight = np.ones(lons2.shape, np.int8)
+ daynight = np.where(lats2>lats,0,daynight)
 return lons2,lats2,daynight
 
 # current time in UTC.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 21:03:26
Revision: 7557
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7557&view=rev
Author: jswhit
Date: 2009年08月24日 21:03:17 +0000 (2009年8月24日)
Log Message:
-----------
use alpha transparency
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 20:31:17 UTC (rev 7556)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 21:03:17 UTC (rev 7557)
@@ -68,12 +68,16 @@
 map.drawcoastlines()
 map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
 map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
+# fill continents 'coral' (with zorder=0), color wet areas 'aqua'
+map.drawmapboundary(fill_color='aqua')
+map.fillcontinents(color='coral',lake_color='aqua',zorder=0)
 # create grid of day=0, night=1
 # 1441 means use a 0.25 degree grid.
 lons,lats,daynight = daynightgrid(d,1441)
 x,y = map(lons, lats)
 # contour this grid with 1 contour level, specifying colors.
-# (gray for night, axis background for day)
-map.contourf(x,y,daynight,1,colors=[plt.gca().get_axis_bgcolor(),'0.7'])
+# (gray for night, white for day). Use alpha transparency so
+# map shows through.
+CS=map.contourf(x,y,daynight,1,colors=['white','0.7'],alpha=0.5)
 plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 20:31:24
Revision: 7556
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7556&view=rev
Author: jswhit
Date: 2009年08月24日 20:31:17 +0000 (2009年8月24日)
Log Message:
-----------
add new daynight.py example.
Modified Paths:
--------------
 trunk/toolkits/basemap/MANIFEST.in
 trunk/toolkits/basemap/examples/README
 trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in	2009年08月24日 19:03:32 UTC (rev 7555)
+++ trunk/toolkits/basemap/MANIFEST.in	2009年08月24日 20:31:17 UTC (rev 7556)
@@ -19,6 +19,7 @@
 include examples/hires.py
 include examples/simpletest_oo.py
 include examples/randompoints.py
+include examples/daynight.py
 include examples/test.py
 include examples/us_25m.dem
 include examples/testgdal.py
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README	2009年08月24日 19:03:32 UTC (rev 7555)
+++ trunk/toolkits/basemap/examples/README	2009年08月24日 20:31:17 UTC (rev 7556)
@@ -131,3 +131,5 @@
 
 plothighsandlows.py shows to plot H's and L's at the local extrema of a pressure map
 (requires scipy).
+
+daynight.py shows how to shade the regions of a map where the sun has set.
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 19:03:32 UTC (rev 7555)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 20:31:17 UTC (rev 7556)
@@ -3,6 +3,9 @@
 import matplotlib.pyplot as plt
 from datetime import datetime
 
+# example showing how to compute the day/night terminator and shade nightime
+# areas on a map.
+
 def epem(date):
 """
 input: date - datetime object (assumed UTC)
@@ -56,7 +59,7 @@
 daynight[:,nlon] = np.where(lats2[:,nlon]>lats[nlon],0,daynight[:,nlon])
 return lons2,lats2,daynight
 
-# now, in UTC time.
+# current time in UTC.
 d = datetime.utcnow()
 
 # miller projection 
@@ -66,6 +69,7 @@
 map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
 map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
 # create grid of day=0, night=1
+# 1441 means use a 0.25 degree grid.
 lons,lats,daynight = daynightgrid(d,1441)
 x,y = map(lons, lats)
 # contour this grid with 1 contour level, specifying colors.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 19:03:46
Revision: 7555
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7555&view=rev
Author: jswhit
Date: 2009年08月24日 19:03:32 +0000 (2009年8月24日)
Log Message:
-----------
rename example
Added Paths:
-----------
 trunk/toolkits/basemap/examples/daynight.py
Removed Paths:
-------------
 trunk/toolkits/basemap/examples/terminator.py
Copied: trunk/toolkits/basemap/examples/daynight.py (from rev 7554, trunk/toolkits/basemap/examples/terminator.py)
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py	 (rev 0)
+++ trunk/toolkits/basemap/examples/daynight.py	2009年08月24日 19:03:32 UTC (rev 7555)
@@ -0,0 +1,75 @@
+import numpy as np
+from mpl_toolkits.basemap import Basemap, netcdftime
+import matplotlib.pyplot as plt
+from datetime import datetime
+
+def epem(date):
+ """
+ input: date - datetime object (assumed UTC)
+ ouput: gha - Greenwich hour angle, the angle between the Greenwich
+ meridian and the meridian containing the subsolar point.
+ dec - solar declination.
+ """
+ dg2rad = np.pi/180.
+ rad2dg = 1./dg2rad
+ # compute julian day from UTC datetime object.
+ jday = netcdftime.JulianDayFromDate(date)
+ jd = np.floor(jday) # truncate to integer.
+ # utc hour.
+ ut = d.hour + d.minute/60. + d.second/3600.
+ # calculate number of centuries from J2000
+ t = (jd + (ut/24.) - 2451545.0) / 36525.
+ # mean longitude corrected for aberration
+ l = (280.460 + 36000.770 * t) % 360
+ # mean anomaly
+ g = 357.528 + 35999.050 * t
+ # ecliptic longitude
+ lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
+ # obliquity of the ecliptic
+ ep = 23.4393 - 0.01300 * t
+ # equation of time
+ eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
+ + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
+ # Greenwich hour angle
+ gha = 15*ut - 180 + eqtime
+ # declination of sun
+ dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
+ return gha, dec
+
+def daynightgrid(date, nlons):
+ """
+ date is datetime object (assumed UTC).
+ nlons is # of longitudes used to compute terminator."""
+ nlats = ((nlons-1)/2)+1
+ dg2rad = np.pi/180.
+ lons = np.linspace(-180,180,nlons)
+ # compute greenwich hour angle and solar declination
+ # from datetime object (assumed UTC).
+ tau, dec = epem(date) 
+ longitude = lons + tau
+ lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
+ lons2 = np.linspace(-180,180,nlons)
+ lats2 = np.linspace(-90,90,nlats)
+ lons2, lats2 = np.meshgrid(lons2,lats2)
+ daynight = np.ones(lons2.shape, np.float)
+ for nlon in range(nlons):
+ daynight[:,nlon] = np.where(lats2[:,nlon]>lats[nlon],0,daynight[:,nlon])
+ return lons2,lats2,daynight
+
+# now, in UTC time.
+d = datetime.utcnow()
+
+# miller projection 
+map = Basemap(projection='mill',lon_0=0)
+# plot coastlines, draw label meridians and parallels.
+map.drawcoastlines()
+map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
+map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
+# create grid of day=0, night=1
+lons,lats,daynight = daynightgrid(d,1441)
+x,y = map(lons, lats)
+# contour this grid with 1 contour level, specifying colors.
+# (gray for night, axis background for day)
+map.contourf(x,y,daynight,1,colors=[plt.gca().get_axis_bgcolor(),'0.7'])
+plt.title('Day/Night Map for %s (UTC)' %d )
+plt.show()
Deleted: trunk/toolkits/basemap/examples/terminator.py
===================================================================
--- trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 18:00:34 UTC (rev 7554)
+++ trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 19:03:32 UTC (rev 7555)
@@ -1,75 +0,0 @@
-import numpy as np
-from mpl_toolkits.basemap import Basemap, netcdftime
-import matplotlib.pyplot as plt
-from datetime import datetime
-
-def epem(date):
- """
- input: date - datetime object (assumed UTC)
- ouput: gha - Greenwich hour angle, the angle between the Greenwich
- meridian and the meridian containing the subsolar point.
- dec - solar declination.
- """
- dg2rad = np.pi/180.
- rad2dg = 1./dg2rad
- # compute julian day from UTC datetime object.
- jday = netcdftime.JulianDayFromDate(date)
- jd = np.floor(jday) # truncate to integer.
- # utc hour.
- ut = d.hour + d.minute/60. + d.second/3600.
- # calculate number of centuries from J2000
- t = (jd + (ut/24.) - 2451545.0) / 36525.
- # mean longitude corrected for aberration
- l = (280.460 + 36000.770 * t) % 360
- # mean anomaly
- g = 357.528 + 35999.050 * t
- # ecliptic longitude
- lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
- # obliquity of the ecliptic
- ep = 23.4393 - 0.01300 * t
- # equation of time
- eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
- + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
- # Greenwich hour angle
- gha = 15*ut - 180 + eqtime
- # declination of sun
- dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
- return gha, dec
-
-def daynightgrid(date, nlons):
- """
- date is datetime object (assumed UTC).
- nlons is # of longitudes used to compute terminator."""
- nlats = ((nlons-1)/2)+1
- dg2rad = np.pi/180.
- lons = np.linspace(-180,180,nlons)
- # compute greenwich hour angle and solar declination
- # from datetime object (assumed UTC).
- tau, dec = epem(date) 
- longitude = lons + tau
- lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
- lons2 = np.linspace(-180,180,nlons)
- lats2 = np.linspace(-90,90,nlats)
- lons2, lats2 = np.meshgrid(lons2,lats2)
- daynight = np.ones(lons2.shape, np.float)
- for nlon in range(nlons):
- daynight[:,nlon] = np.where(lats2[:,nlon]>lats[nlon],0,daynight[:,nlon])
- return lons2,lats2,daynight
-
-# now, in UTC time.
-d = datetime.utcnow()
-
-# miller projection 
-map = Basemap(projection='mill',lon_0=0)
-# plot coastlines, draw label meridians and parallels.
-map.drawcoastlines()
-map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
-map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
-# create grid of day=0, night=1
-lons,lats,daynight = daynightgrid(d,1441)
-x,y = map(lons, lats)
-# contour this grid with 1 contour level, specifying colors.
-# (gray for night, axis background for day)
-map.contourf(x,y,daynight,1,colors=[plt.gca().get_axis_bgcolor(),'0.7'])
-plt.title('Day/Night Map for %s (UTC)' %d )
-plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 18:00:42
Revision: 7554
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7554&view=rev
Author: jswhit
Date: 2009年08月24日 18:00:34 +0000 (2009年8月24日)
Log Message:
-----------
fix comment
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/terminator.py
Modified: trunk/toolkits/basemap/examples/terminator.py
===================================================================
--- trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 17:59:14 UTC (rev 7553)
+++ trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 18:00:34 UTC (rev 7554)
@@ -65,7 +65,7 @@
 map.drawcoastlines()
 map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
 map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
-# create grid of day=1, night=0
+# create grid of day=0, night=1
 lons,lats,daynight = daynightgrid(d,1441)
 x,y = map(lons, lats)
 # contour this grid with 1 contour level, specifying colors.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 17:59:21
Revision: 7553
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7553&view=rev
Author: jswhit
Date: 2009年08月24日 17:59:14 +0000 (2009年8月24日)
Log Message:
-----------
fix title
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/terminator.py
Modified: trunk/toolkits/basemap/examples/terminator.py
===================================================================
--- trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 17:57:54 UTC (rev 7552)
+++ trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 17:59:14 UTC (rev 7553)
@@ -71,5 +71,5 @@
 # contour this grid with 1 contour level, specifying colors.
 # (gray for night, axis background for day)
 map.contourf(x,y,daynight,1,colors=[plt.gca().get_axis_bgcolor(),'0.7'])
-plt.title('Day/Night Terminator %s' %d)
+plt.title('Day/Night Map for %s (UTC)' %d )
 plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2009年08月24日 17:58:02
Revision: 7552
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7552&view=rev
Author: jswhit
Date: 2009年08月24日 17:57:54 +0000 (2009年8月24日)
Log Message:
-----------
add example that computes day/night terminator and shades night regions on a map.
Added Paths:
-----------
 trunk/toolkits/basemap/examples/terminator.py
Added: trunk/toolkits/basemap/examples/terminator.py
===================================================================
--- trunk/toolkits/basemap/examples/terminator.py	 (rev 0)
+++ trunk/toolkits/basemap/examples/terminator.py	2009年08月24日 17:57:54 UTC (rev 7552)
@@ -0,0 +1,75 @@
+import numpy as np
+from mpl_toolkits.basemap import Basemap, netcdftime
+import matplotlib.pyplot as plt
+from datetime import datetime
+
+def epem(date):
+ """
+ input: date - datetime object (assumed UTC)
+ ouput: gha - Greenwich hour angle, the angle between the Greenwich
+ meridian and the meridian containing the subsolar point.
+ dec - solar declination.
+ """
+ dg2rad = np.pi/180.
+ rad2dg = 1./dg2rad
+ # compute julian day from UTC datetime object.
+ jday = netcdftime.JulianDayFromDate(date)
+ jd = np.floor(jday) # truncate to integer.
+ # utc hour.
+ ut = d.hour + d.minute/60. + d.second/3600.
+ # calculate number of centuries from J2000
+ t = (jd + (ut/24.) - 2451545.0) / 36525.
+ # mean longitude corrected for aberration
+ l = (280.460 + 36000.770 * t) % 360
+ # mean anomaly
+ g = 357.528 + 35999.050 * t
+ # ecliptic longitude
+ lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
+ # obliquity of the ecliptic
+ ep = 23.4393 - 0.01300 * t
+ # equation of time
+ eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
+ + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
+ # Greenwich hour angle
+ gha = 15*ut - 180 + eqtime
+ # declination of sun
+ dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
+ return gha, dec
+
+def daynightgrid(date, nlons):
+ """
+ date is datetime object (assumed UTC).
+ nlons is # of longitudes used to compute terminator."""
+ nlats = ((nlons-1)/2)+1
+ dg2rad = np.pi/180.
+ lons = np.linspace(-180,180,nlons)
+ # compute greenwich hour angle and solar declination
+ # from datetime object (assumed UTC).
+ tau, dec = epem(date) 
+ longitude = lons + tau
+ lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
+ lons2 = np.linspace(-180,180,nlons)
+ lats2 = np.linspace(-90,90,nlats)
+ lons2, lats2 = np.meshgrid(lons2,lats2)
+ daynight = np.ones(lons2.shape, np.float)
+ for nlon in range(nlons):
+ daynight[:,nlon] = np.where(lats2[:,nlon]>lats[nlon],0,daynight[:,nlon])
+ return lons2,lats2,daynight
+
+# now, in UTC time.
+d = datetime.utcnow()
+
+# miller projection 
+map = Basemap(projection='mill',lon_0=0)
+# plot coastlines, draw label meridians and parallels.
+map.drawcoastlines()
+map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
+map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
+# create grid of day=1, night=0
+lons,lats,daynight = daynightgrid(d,1441)
+x,y = map(lons, lats)
+# contour this grid with 1 contour level, specifying colors.
+# (gray for night, axis background for day)
+map.contourf(x,y,daynight,1,colors=[plt.gca().get_axis_bgcolor(),'0.7'])
+plt.title('Day/Night Terminator %s' %d)
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7551
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7551&view=rev
Author: astraw
Date: 2009年08月24日 03:26:13 +0000 (2009年8月24日)
Log Message:
-----------
buildbot: revert set file permissions
Modified Paths:
--------------
 trunk/matplotlib/test/_buildbot_test_postmortem.py
Modified: trunk/matplotlib/test/_buildbot_test_postmortem.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 03:23:40 UTC (rev 7550)
+++ trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 03:26:13 UTC (rev 7551)
@@ -102,9 +102,3 @@
 os.path.join(this_targetdir,'actual.png') )
 shutil.copy( os.path.join(root,savedresults_dir,testclass,fname),
 os.path.join(this_targetdir,'absdiff.png') )
-
- os.chmod(target_dir,0755)
- os.chmod(this_targetdir,0755)
- os.chmod(os.path.join(this_targetdir,'baseline.png'),0744)
- os.chmod(os.path.join(this_targetdir,'actual.png'),0744)
- os.chmod(os.path.join(this_targetdir,'absdiff.png'),0744)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7550
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7550&view=rev
Author: astraw
Date: 2009年08月24日 03:23:40 +0000 (2009年8月24日)
Log Message:
-----------
buildbot: set file permissions on files to upload (fix)
Modified Paths:
--------------
 trunk/matplotlib/test/_buildbot_test_postmortem.py
Modified: trunk/matplotlib/test/_buildbot_test_postmortem.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 03:21:12 UTC (rev 7549)
+++ trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 03:23:40 UTC (rev 7550)
@@ -103,6 +103,7 @@
 shutil.copy( os.path.join(root,savedresults_dir,testclass,fname),
 os.path.join(this_targetdir,'absdiff.png') )
 
+ os.chmod(target_dir,0755)
 os.chmod(this_targetdir,0755)
 os.chmod(os.path.join(this_targetdir,'baseline.png'),0744)
 os.chmod(os.path.join(this_targetdir,'actual.png'),0744)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7549
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7549&view=rev
Author: astraw
Date: 2009年08月24日 03:21:12 +0000 (2009年8月24日)
Log Message:
-----------
buildbot: set file permissions on files to upload
Modified Paths:
--------------
 trunk/matplotlib/test/_buildbot_test_postmortem.py
Modified: trunk/matplotlib/test/_buildbot_test_postmortem.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 02:37:21 UTC (rev 7548)
+++ trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 03:21:12 UTC (rev 7549)
@@ -102,3 +102,8 @@
 os.path.join(this_targetdir,'actual.png') )
 shutil.copy( os.path.join(root,savedresults_dir,testclass,fname),
 os.path.join(this_targetdir,'absdiff.png') )
+
+ os.chmod(this_targetdir,0755)
+ os.chmod(os.path.join(this_targetdir,'baseline.png'),0744)
+ os.chmod(os.path.join(this_targetdir,'actual.png'),0744)
+ os.chmod(os.path.join(this_targetdir,'absdiff.png'),0744)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7548
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7548&view=rev
Author: astraw
Date: 2009年08月24日 02:37:21 +0000 (2009年8月24日)
Log Message:
-----------
buildbot: add script to consolidate failed images
Added Paths:
-----------
 trunk/matplotlib/test/_buildbot_test_postmortem.py
Added: trunk/matplotlib/test/_buildbot_test_postmortem.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test_postmortem.py	 (rev 0)
+++ trunk/matplotlib/test/_buildbot_test_postmortem.py	2009年08月24日 02:37:21 UTC (rev 7548)
@@ -0,0 +1,104 @@
+"""For all failed image comparisons, gather the baseline image, the
+current image and the absdiff image into a single directory specified
+by target_dir.
+
+This is meant to be run from the mplroot directory."""
+
+import os, sys, glob, shutil
+
+roots = ['test_matplotlib','test_plots']
+savedresults_dir = 'saved-results'
+baseline_dir = 'baseline'
+basename = 'failed-diff-'
+target_dir = os.path.abspath('status_images')
+nbase = len(basename)
+
+def listFiles(root, patterns='*', recurse=1, return_folders=0):
+ """
+ Recursively list files
+
+ from Parmar and Martelli in the Python Cookbook
+ """
+ import os.path, fnmatch
+ # Expand patterns from semicolon-separated string to list
+ pattern_list = patterns.split(';')
+ # Collect input and output arguments into one bunch
+ class Bunch:
+ def __init__(self, **kwds): self.__dict__.update(kwds)
+ arg = Bunch(recurse=recurse, pattern_list=pattern_list,
+ return_folders=return_folders, results=[])
+
+ def visit(arg, dirname, files):
+ # Append to arg.results all relevant files (and perhaps folders)
+ for name in files:
+ fullname = os.path.normpath(os.path.join(dirname, name))
+ if arg.return_folders or os.path.isfile(fullname):
+ for pattern in arg.pattern_list:
+ if fnmatch.fnmatch(name, pattern):
+ arg.results.append(fullname)
+ break
+ # Block recursion if recursion was disallowed
+ if not arg.recurse: files[:]=[]
+
+ os.path.walk(root, visit, arg)
+
+ return arg.results
+
+def get_recursive_filelist(args):
+ """
+ Recurse all the files and dirs in *args* ignoring symbolic links
+ and return the files as a list of strings
+ """
+ files = []
+
+ for arg in args:
+ if os.path.isfile(arg):
+ files.append(arg)
+ continue
+ if os.path.isdir(arg):
+ newfiles = listFiles(arg, recurse=1, return_folders=1)
+ files.extend(newfiles)
+
+ return [f for f in files if not os.path.islink(f)]
+
+def path_split_all(fname):
+ """split a file path into a list of directories and filename"""
+ pieces = [fname]
+ previous_tails = []
+ while 1:
+ head,tail = os.path.split(pieces[0])
+ if head=='':
+ return pieces + previous_tails
+ pieces = [head]
+ previous_tails.insert(0,tail)
+
+if 1:
+ if os.path.exists(target_dir):
+ shutil.rmtree(target_dir)
+ os.chdir('test')
+ for fpath in get_recursive_filelist(roots):
+ # only images
+ if not fpath.endswith('.png'): continue
+
+ pieces = path_split_all( fpath )
+ if pieces[1]!=savedresults_dir:
+ continue
+ root = pieces[0]
+ testclass = pieces[2]
+ fname = pieces[3]
+ if not fname.startswith(basename):
+ # only failed images
+ continue
+ origname = fname[nbase:]
+ testname = os.path.splitext(origname)[0]
+
+ # make a name for the test
+ teststr = '%s.%s.%s'%(root,testclass,testname)
+ this_targetdir = os.path.join(target_dir,teststr)
+ os.makedirs( this_targetdir )
+ shutil.copy( os.path.join(root,baseline_dir,testclass,origname),
+ os.path.join(this_targetdir,'baseline.png') )
+ shutil.copy( os.path.join(root,savedresults_dir,testclass,origname),
+ os.path.join(this_targetdir,'actual.png') )
+ shutil.copy( os.path.join(root,savedresults_dir,testclass,fname),
+ os.path.join(this_targetdir,'absdiff.png') )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing results of 296

<< < 1 2 3 4 5 .. 12 > >> (Page 3 of 12)
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 によって変換されたページ (->オリジナル) /