Problem with date_demo3.py?

Using matplotlib 0.84, python 2.4, scipy 0.3.2, numeric 23.7.

date_demo3.py does not work as is.

Below is a 'diff' file that will create a date_demo3.py that does what I think the original intended to do.

···

------------------------
wjd@...873... ~/test $ diff date_demo3.py ../matplotlib_examples/date_demo3.py

8c8
< import datetime
---
> from datetime import datetime
10c10,12
< from pylab import date2num,array,rand,subplot,HourLocator,MinuteLocator,DateFormatter,bar,show
---
> from matplotlib.dates import intdate
> from matplotlib.ticker import MinuteLocator, DateFormatter
> from matplotlib.matlab import *
13,14c15,16
< t0 = datetime.datetime(2004,04,27)
< t = array([date2num(t0+datetime.timedelta(minutes=2*i)) for i in range(60)])
---
> t0 = time.mktime(datetime(2004,04,27).timetuple())
> t = t0+arange(0, 2*3600, 60) # 2 hours sampled every 2 minute
18c20
< ax.xaxis.set_major_locator( MinuteLocator(byminute=range(0,60,20) ))
---
> ax.xaxis.set_major_locator( MinuteLocator(20) )
20,21c22
< #1 bar every 2 minutes, bar width = space between bars, 1440 minutes per day
< bar(t, s, width=1.0/1440)
---
> bar(t, s, width=60)
22a24,26
-----------------------------------
Bill