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 (Tue, 25 Aug 2009) 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. |