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
|
|
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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 (Mon, 24 Aug 2009)
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.
|
|
From: <as...@us...> - 2009-08-24 03:26:20
|
Revision: 7551
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7551&view=rev
Author: astraw
Date: 2009-08-24 03:26:13 +0000 (Mon, 24 Aug 2009)
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.
|
|
From: <as...@us...> - 2009-08-24 03:23:46
|
Revision: 7550
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7550&view=rev
Author: astraw
Date: 2009-08-24 03:23:40 +0000 (Mon, 24 Aug 2009)
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.
|
|
From: <as...@us...> - 2009-08-24 03:21:20
|
Revision: 7549
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7549&view=rev
Author: astraw
Date: 2009-08-24 03:21:12 +0000 (Mon, 24 Aug 2009)
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.
|
|
From: <as...@us...> - 2009-08-24 02:37:27
|
Revision: 7548
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7548&view=rev
Author: astraw
Date: 2009-08-24 02:37:21 +0000 (Mon, 24 Aug 2009)
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.
|
|
From: <as...@us...> - 2009-08-23 19:19:11
|
Revision: 7547
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7547&view=rev
Author: astraw
Date: 2009-08-23 19:19:03 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
keep failed images
Modified Paths:
--------------
trunk/matplotlib/test/_buildbot_test.py
Modified: trunk/matplotlib/test/_buildbot_test.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test.py 2009-08-23 19:14:04 UTC (rev 7546)
+++ trunk/matplotlib/test/_buildbot_test.py 2009-08-23 19:19:03 UTC (rev 7547)
@@ -13,5 +13,5 @@
TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)
-check_call('%s run-mpl-test.py --all'%TARGET_py,
+check_call('%s run-mpl-test.py --all --keep-failed'%TARGET_py,
cwd='test')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-23 19:14:10
|
Revision: 7546
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7546&view=rev
Author: astraw
Date: 2009-08-23 19:14:04 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
erase /home/astraw/.matplotlib before testing (fix)
Modified Paths:
--------------
trunk/matplotlib/test/_buildbot_test.py
Modified: trunk/matplotlib/test/_buildbot_test.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test.py 2009-08-23 19:12:30 UTC (rev 7545)
+++ trunk/matplotlib/test/_buildbot_test.py 2009-08-23 19:14:04 UTC (rev 7546)
@@ -10,9 +10,8 @@
if not os.path.exists(TARGET):
raise RuntimeError('the virtualenv target directory was not found')
+TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)
-shutil.rmtree( os.expanduser( os.path.join('~','.matplotlib')))
-TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s run-mpl-test.py --all'%TARGET_py,
cwd='test')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-23 19:12:41
|
Revision: 7545
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7545&view=rev
Author: jdh2358
Date: 2009-08-23 19:12:30 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
flush config dir and use rc on build slaves
Modified Paths:
--------------
trunk/matplotlib/test/_buildbot_mac_sage.sh
trunk/matplotlib/test/matplotlibrc
Modified: trunk/matplotlib/test/_buildbot_mac_sage.sh
===================================================================
--- trunk/matplotlib/test/_buildbot_mac_sage.sh 2009-08-23 19:12:20 UTC (rev 7544)
+++ trunk/matplotlib/test/_buildbot_mac_sage.sh 2009-08-23 19:12:30 UTC (rev 7545)
@@ -1,9 +1,11 @@
#!/bin/bash
set -e
-export PYTHON=/Users/jdh2358/dev/bin/python
-export PREFIX=/Users/jdh2358/devbb
-export PYTHONPATH=${PREFIX}/lib/python2.6/site-packages:/Users/jdh2358/dev/lib/python2.6/site-packages
+rm -rf ${HOME}/.matplotlib/*
+export PYTHON=${HOME}/dev/bin/python
+export PREFIX=${HOME}/devbb
+export PYTHONPATH=${PREFIX}/lib/python2.6/site-packages:${HOME}/dev/lib/python2.6/site-packages
+
make -f make.osx mpl_install
echo ${PYTHONPATH}
Modified: trunk/matplotlib/test/matplotlibrc
===================================================================
--- trunk/matplotlib/test/matplotlibrc 2009-08-23 19:12:20 UTC (rev 7544)
+++ trunk/matplotlib/test/matplotlibrc 2009-08-23 19:12:30 UTC (rev 7545)
@@ -1,3 +1,3 @@
-#This is an empty matplotlibrc so that the tests use the
-#matplotlib default config and not the user's config. This keeps
-#settings like font sizes from causing the image comparison tests to fail.
+backend : Agg
+font.family : sans-serif
+font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-23 19:12:29
|
Revision: 7544
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7544&view=rev
Author: astraw
Date: 2009-08-23 19:12:20 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
erase /home/astraw/.matplotlib before testing
Modified Paths:
--------------
trunk/matplotlib/test/_buildbot_test.py
Modified: trunk/matplotlib/test/_buildbot_test.py
===================================================================
--- trunk/matplotlib/test/_buildbot_test.py 2009-08-23 18:59:07 UTC (rev 7543)
+++ trunk/matplotlib/test/_buildbot_test.py 2009-08-23 19:12:20 UTC (rev 7544)
@@ -10,6 +10,9 @@
if not os.path.exists(TARGET):
raise RuntimeError('the virtualenv target directory was not found')
+check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)
+
+shutil.rmtree( os.expanduser( os.path.join('~','.matplotlib')))
TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s run-mpl-test.py --all'%TARGET_py,
cwd='test')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-23 18:59:16
|
Revision: 7543
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7543&view=rev
Author: jdh2358
Date: 2009-08-23 18:59:07 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
fixes to sage build slave
Modified Paths:
--------------
trunk/matplotlib/test/README.build_slaves
trunk/matplotlib/test/_buildbot_mac_sage.sh
Modified: trunk/matplotlib/test/README.build_slaves
===================================================================
--- trunk/matplotlib/test/README.build_slaves 2009-08-23 18:44:35 UTC (rev 7542)
+++ trunk/matplotlib/test/README.build_slaves 2009-08-23 18:59:07 UTC (rev 7543)
@@ -2,3 +2,9 @@
python source install with clean installs of numpy and mpl. Both of
these will need nose installed.
+Dependencies
+===================
+buildbot and twisted
+nose
+pil
+virtualenv
Modified: trunk/matplotlib/test/_buildbot_mac_sage.sh
===================================================================
--- trunk/matplotlib/test/_buildbot_mac_sage.sh 2009-08-23 18:44:35 UTC (rev 7542)
+++ trunk/matplotlib/test/_buildbot_mac_sage.sh 2009-08-23 18:59:07 UTC (rev 7543)
@@ -1,2 +1,10 @@
-#!/bin/sh
-PREFIX=/Users/jdh2358/devbb make -f make.osx mpl_install
+#!/bin/bash
+set -e
+export PYTHON=/Users/jdh2358/dev/bin/python
+export PREFIX=/Users/jdh2358/devbb
+export PYTHONPATH=${PREFIX}/lib/python2.6/site-packages:/Users/jdh2358/dev/lib/python2.6/site-packages
+
+make -f make.osx mpl_install
+echo ${PYTHONPATH}
+
+cd test && python run-mpl-test.py --all --keep-failed
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-23 18:44:44
|
Revision: 7542
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7542&view=rev
Author: jdh2358
Date: 2009-08-23 18:44:35 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
Merged revisions 7536,7541 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint
........
r7536 | jdh2358 | 2009-08-23 00:27:40 -0500 (Sun, 23 Aug 2009) | 1 line
fix some typos in the docs
........
r7541 | jdh2358 | 2009-08-23 13:42:37 -0500 (Sun, 23 Aug 2009) | 1 line
more harness around locale
........
Modified Paths:
--------------
trunk/matplotlib/doc/users/annotations_guide.rst
trunk/matplotlib/doc/users/event_handling.rst
trunk/matplotlib/doc/users/installing.rst
trunk/matplotlib/doc/users/path_tutorial.rst
trunk/matplotlib/doc/users/shell.rst
trunk/matplotlib/doc/users/transforms_tutorial.rst
trunk/matplotlib/lib/matplotlib/cbook.py
Added Paths:
-----------
trunk/matplotlib/examples/animation/animate_decay_tk_blit.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7533
+ /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7541
Modified: trunk/matplotlib/doc/users/annotations_guide.rst
===================================================================
--- trunk/matplotlib/doc/users/annotations_guide.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/annotations_guide.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -4,7 +4,7 @@
Annotating Axes
****************
-Do not proceed unless you already have read
+Do not proceed unless you already have read
:func:`~matplotlib.pyplot.text` and :func:`~matplotlib.pyplot.annotate`!
@@ -38,7 +38,7 @@
bb.set_boxstyle("rarrow", pad=0.6)
The arguments are the name of the box style with its attributes as
-keyword arguments. Currently, followign box styles are implemented.
+keyword arguments. Currently, following box styles are implemented.
========== ============== ==========================
Class Name Attrs
@@ -55,7 +55,7 @@
.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py
-Note that the attrubutes arguments can be specified within the style
+Note that the attributes arguments can be specified within the style
name with separating comma (this form can be used as "boxstyle" value
of bbox argument when initializing the text instance) ::
@@ -103,7 +103,7 @@
2. If patch object is given (*patchA* & *patchB*), the path is clipped to
avoid the patch.
-3. The path is further shrinked by given amount of pixels (*shirnkA*
+3. The path is further shrunk by given amount of pixels (*shirnkA*
& *shrinkB*)
4. The path is transmuted to arrow patch, which is controlled by the
@@ -114,7 +114,7 @@
The creation of the connecting path between two points is controlled by
-``connectionstyle`` key and follwing styles are available.
+``connectionstyle`` key and following styles are available.
========== =============================================
Name Attrs
@@ -197,7 +197,7 @@
ax2.add_artist(con)
The above code connects point xy in data coordinate of ``ax1`` to
-point xy int data coordiante of ``ax2``. Here is a simple example.
+point xy int data coordinate of ``ax2``. Here is a simple example.
.. plot:: users/plotting/examples/connect_simple01.py
@@ -230,7 +230,7 @@
The *loc* keyword has same meaning as in the legend command.
A simple application is when the size of the artist (or collection of
-artists) is knwon in pixel size during the time of creation. For
+artists) is known in pixel size during the time of creation. For
example, If you want to draw a circle with fixed size of 20 pixel x 20
pixel (radius = 10 pixel), you can utilize
``AnchoredDrawingArea``. The instance is created with a size of the
@@ -280,7 +280,7 @@
.. plot:: users/plotting/examples/anchored_box04.py
Note that unlike the legend, the ``bbox_transform`` is set
-to IdentityTransform by default.
+to IdentityTransform by default.
Advanced Topics
***************
@@ -288,7 +288,7 @@
Zoom effect between Axes
========================
-mpl_toolkits.axes_grid.inset_locator defines some patch classs useful
+mpl_toolkits.axes_grid.inset_locator defines some patch classes useful
for interconnect two axes. Understanding the code requires some
knowledge of how mpl's transform works. But, utilizing it will be
straight forward.
@@ -327,6 +327,6 @@
:include-source:
-Similarly, you can define custom ConnectionStyle and Custome ArrowStyle.
+Similarly, you can define custom ConnectionStyle and custom ArrowStyle.
See the source code of ``lib/matplotlib/patches.py`` and check
how each style class is defined.
Modified: trunk/matplotlib/doc/users/event_handling.rst
===================================================================
--- trunk/matplotlib/doc/users/event_handling.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/event_handling.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -5,7 +5,7 @@
**************************
matplotlib works with 6 user interface toolkits (wxpython, tkinter,
-qt, gtk, fltk abd macosx) and in order to support features like interactive
+qt, gtk, fltk and macosx) and in order to support features like interactive
panning and zooming of figures, it is helpful to the developers to
have an API for interacting with the figure via key presses and mouse
movements that is "GUI neutral" so we don't have to repeat a lot of
@@ -150,7 +150,7 @@
Write draggable rectangle class that is initialized with a
:class:`~matplotlib.patches.Rectangle` instance but will move its x,y
-location when dragged. Hint: you will need to store the orginal
+location when dragged. Hint: you will need to store the original
``xy`` location of the rectangle which is stored as rect.xy and
connect to the press, motion and release mouse events. When the mouse
is pressed, check to see if the click occurs over your rectangle (see
Modified: trunk/matplotlib/doc/users/installing.rst
===================================================================
--- trunk/matplotlib/doc/users/installing.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/installing.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -22,7 +22,7 @@
One single click installer and you are done.
-Ok, so you want to do it the hard way?
+OK, so you want to do it the hard way?
======================================
For some people, the prepackaged pythons discussed above are not an
@@ -109,7 +109,7 @@
packaging matplotlib.
-.. _install_requrements:
+.. _install_requirements:
Build requirements
==================
@@ -152,7 +152,7 @@
The Qt3 widgets library python wrappers for the QtAgg backend
:term:`pyqt` 4.0 or later
- The Qt4 widgets library python wrappersfor the Qt4Agg backend
+ The Qt4 widgets library python wrappers for the Qt4Agg backend
:term:`pygtk` 2.2 or later
The python wrappers for the GTK widgets library for use with the GTK or GTKAgg backend
@@ -201,5 +201,5 @@
instruction in the README. This directory has a Makefile which will
automatically grab the zlib, png and freetype dependencies from the
web, build them with the right flags to make universal libraries, and
-then build the matplotlib source and binary installers.
-
\ No newline at end of file
+then build the matplotlib source and binary installers.
+
Modified: trunk/matplotlib/doc/users/path_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/path_tutorial.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/path_tutorial.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -71,7 +71,7 @@
control point and one end point, and CURVE4 has three vertices for the
two control points and the end point. The example below shows a
CURVE4 Bézier spline -- the bézier curve will be contained in the
-convex hul of the start point, the two control points, and the end
+convex hull of the start point, the two control points, and the end
point
.. plot::
@@ -123,7 +123,7 @@
like :meth:`~matplotlib.axes.Axes.hist` and
:meth:`~matplotlib.axes.Axes.bar`, which create a number of
primitives, eg a bunch of Rectangles, can usually be implemented more
-efficiently using a compund path. The reason ``bar`` creates a list
+efficiently using a compound path. The reason ``bar`` creates a list
of rectangles and not a compound path is largely historical: the
:class:`~matplotlib.path.Path` code is comparatively new and ``bar``
predates it. While we could change it now, it would break old code,
Modified: trunk/matplotlib/doc/users/shell.rst
===================================================================
--- trunk/matplotlib/doc/users/shell.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/shell.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -66,7 +66,7 @@
=========================
If you can't use ipython, and still want to use matplotlib/pylab from
-an interactive python shell, eg the plain-ol standard python
+an interactive python shell, eg the plain-ole standard python
interactive interpreter, or the interpreter in your favorite IDE, you
are going to need to understand what a matplotlib backend is
:ref:`what-is-a-backend`.
Modified: trunk/matplotlib/doc/users/transforms_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-23 18:44:35 UTC (rev 7542)
@@ -225,7 +225,7 @@
:meth:`~matplotlib.axes.Axes.axvspan`) but for didactic purposes we
will implement the horizontal span here using a blended
transformation. This trick only works for separable transformations,
-like you see in normal cartesian coordinate systems, but not on
+like you see in normal Cartesian coordinate systems, but not on
inseparable transformations like the
:class:`~matplotlib.projections.polar.PolarAxes.PolarTransform`.
@@ -301,7 +301,7 @@
shadow_transform = ax.transData + offset
showing that can chain transformations using the addition operator.
-This code says: first appy the data transformation ``ax.transData`` and
+This code says: first apply the data transformation ``ax.transData`` and
then translate the data by `dx` and `dy` points.
.. plot::
@@ -352,7 +352,7 @@
in your axes which affects the affine transformation, but you may not
need to compute the potentially expensive nonlinear scales or
projections on simple navigation events. It is also possible to
-multiply affine transformation matrices togeter, and then apply them
+multiply affine transformation matrices together, and then apply them
to coordinates in one step. This is not true of all possible
transformations.
@@ -404,7 +404,7 @@
The final piece is the ``self.transScale`` attribute, which is
responsible for the optional non-linear scaling of the data, eg. for
-logarithmic axes. When an Axes is initally setup, this is just set to
+logarithmic axes. When an Axes is initially setup, this is just set to
the identity transform, since the basic matplotlib axes has linear
scale, but when you call a logarithmic scaling function like
:meth:`~matplotlib.axes.Axes.semilogx` or explicitly set the scale to
@@ -426,7 +426,7 @@
``transProjection`` handles the projection from the space,
eg. latitude and longitude for map data, or radius and theta for polar
-data, to a separable cartesian coordinate system. There are several
+data, to a separable Cartesian coordinate system. There are several
projection examples in the ``matplotlib.projections`` package, and the
best way to learn more is to open the source for those packages and
see how to make your own, since matplotlib supports extensible axes
Copied: trunk/matplotlib/examples/animation/animate_decay_tk_blit.py (from rev 7541, branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py)
===================================================================
--- trunk/matplotlib/examples/animation/animate_decay_tk_blit.py (rev 0)
+++ trunk/matplotlib/examples/animation/animate_decay_tk_blit.py 2009-08-23 18:44:35 UTC (rev 7542)
@@ -0,0 +1,58 @@
+import time, sys
+import numpy as np
+import matplotlib.pyplot as plt
+
+
+def data_gen():
+ t = data_gen.t
+ data_gen.t += 0.05
+ return np.sin(2*np.pi*t) * np.exp(-t/10.)
+data_gen.t = 0
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+line, = ax.plot([], [], animated=True, lw=2)
+ax.set_ylim(-1.1, 1.1)
+ax.set_xlim(0, 5)
+ax.grid()
+xdata, ydata = [], []
+def run(*args):
+ background = fig.canvas.copy_from_bbox(ax.bbox)
+ # for profiling
+ tstart = time.time()
+
+ while 1:
+ # restore the clean slate background
+ fig.canvas.restore_region(background)
+ # update the data
+ t = data_gen.t
+ y = data_gen()
+ xdata.append(t)
+ ydata.append(y)
+ xmin, xmax = ax.get_xlim()
+ if t>=xmax:
+ ax.set_xlim(xmin, 2*xmax)
+ fig.canvas.draw()
+ background = fig.canvas.copy_from_bbox(ax.bbox)
+
+ line.set_data(xdata, ydata)
+
+ # just draw the animated artist
+ ax.draw_artist(line)
+ # just redraw the axes rectangle
+ fig.canvas.blit(ax.bbox)
+
+ if run.cnt==1000:
+ # print the timing info and quit
+ print 'FPS:' , 1000/(time.time()-tstart)
+ sys.exit()
+
+ run.cnt += 1
+run.cnt = 0
+
+
+
+manager = plt.get_current_fig_manager()
+manager.window.after(100, run)
+
+plt.show()
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-23 18:42:37 UTC (rev 7541)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-23 18:44:35 UTC (rev 7542)
@@ -26,7 +26,7 @@
try:
preferredencoding = locale.getpreferredencoding()
-except ValueError:
+except (ValueError, ImportError):
preferredencoding = None
def unicode_safe(s):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-23 18:42:45
|
Revision: 7541
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7541&view=rev
Author: jdh2358
Date: 2009-08-23 18:42:37 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
more harness around locale
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/cbook.py
Modified: branches/v0_99_maint/lib/matplotlib/cbook.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/cbook.py 2009-08-23 18:37:08 UTC (rev 7540)
+++ branches/v0_99_maint/lib/matplotlib/cbook.py 2009-08-23 18:42:37 UTC (rev 7541)
@@ -20,7 +20,7 @@
try:
preferredencoding = locale.getpreferredencoding()
-except ValueError:
+except (ValueError, ImportError):
preferredencoding = None
def unicode_safe(s):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-23 18:37:16
|
Revision: 7540
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7540&view=rev
Author: jdh2358
Date: 2009-08-23 18:37:08 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
added buildbot script for sage box
Added Paths:
-----------
trunk/matplotlib/test/_buildbot_mac_sage.sh
Added: trunk/matplotlib/test/_buildbot_mac_sage.sh
===================================================================
--- trunk/matplotlib/test/_buildbot_mac_sage.sh (rev 0)
+++ trunk/matplotlib/test/_buildbot_mac_sage.sh 2009-08-23 18:37:08 UTC (rev 7540)
@@ -0,0 +1,2 @@
+#!/bin/sh
+PREFIX=/Users/jdh2358/devbb make -f make.osx mpl_install
Property changes on: trunk/matplotlib/test/_buildbot_mac_sage.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-23 07:25:49
|
Revision: 7539
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7539&view=rev
Author: astraw
Date: 2009-08-23 07:25:37 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
Remove trailing whitespace.
(This is most a touch of a file to test the buildbot.)
Modified Paths:
--------------
trunk/matplotlib/test/_buildbot_util.py
Modified: trunk/matplotlib/test/_buildbot_util.py
===================================================================
--- trunk/matplotlib/test/_buildbot_util.py 2009-08-23 06:43:53 UTC (rev 7538)
+++ trunk/matplotlib/test/_buildbot_util.py 2009-08-23 07:25:37 UTC (rev 7539)
@@ -13,7 +13,7 @@
# This use of Popen is copied from matplotlib.texmanager (Use of
# close_fds seems a bit mysterious.)
- p = Popen(args, shell=True,
+ p = Popen(args, shell=True,
close_fds=(sys.platform!='win32'),**kwargs)
p.wait()
if p.returncode!=0:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-23 06:43:59
|
Revision: 7538
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7538&view=rev
Author: astraw
Date: 2009-08-23 06:43:53 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
Remove trailing whitespace from source code file.
(This is mostly just a touch of the file to test the buildbot change detector.)
Modified Paths:
--------------
trunk/matplotlib/make.osx
Modified: trunk/matplotlib/make.osx
===================================================================
--- trunk/matplotlib/make.osx 2009-08-23 05:36:23 UTC (rev 7537)
+++ trunk/matplotlib/make.osx 2009-08-23 06:43:53 UTC (rev 7538)
@@ -1,4 +1,4 @@
-# build mpl into a local install dir with
+# build mpl into a local install dir with
# PREFIX=/Users/jdhunter/dev make -f make.osx fetch deps mpl_install
PYVERSION=2.6
@@ -21,7 +21,7 @@
rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \
freetype-${FREETYPEVERSION}.tar.bz2 bdist_mpkg-${BDISTMPKGVERSION}.tar.gz \
bdist_mpkg-${BDISTMPKGVERSION} \
- zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION}
+ zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION}
fetch:
${PYTHON} -c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\
@@ -78,7 +78,7 @@
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\
export CFLAGS=${CFLAGS_DEPS} &&\
export LDFLAGS=${LDFLAGS_DEPS} &&\
- python setup.py build
+ python setup.py build
mpl_install:
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-23 05:36:33
|
Revision: 7537
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7537&view=rev
Author: astraw
Date: 2009-08-23 05:36:23 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
test script exits with non-zero exit code upon failure
Modified Paths:
--------------
trunk/matplotlib/test/run-mpl-test.py
Modified: trunk/matplotlib/test/run-mpl-test.py
===================================================================
--- trunk/matplotlib/test/run-mpl-test.py 2009-08-23 05:27:40 UTC (rev 7536)
+++ trunk/matplotlib/test/run-mpl-test.py 2009-08-23 05:36:23 UTC (rev 7537)
@@ -89,8 +89,8 @@
sys.exit( 0 )
### Run nose
-nose.run( argv = args,
- plugins = [ MplNosePlugin() ] )
+success = nose.run( argv = args,
+ plugins = [ MplNosePlugin() ] )
### do other stuff here
@@ -104,3 +104,4 @@
sys.stdout = originalStdout
sys.stderr = originalStderr
+sys.exit(not success)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|