Problem with date_demo_rrule.py?

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

I get errors when running date_demo_rrule.py.

Since the demo scripts are for educational purposes and primarily used by newbies, I have a couple of suggestions.

1. Don't use import *, import the specific functions used in the demo. I've had problems with this (especially in the interpreter) because many Python modules use the same names in their global name space and it's easy to inadvertently replace one function with another of the same name which introduces bugs that can be difficult to find.

2. Don't import functions from submodules, instead use the submodule name when calling the function. It makes it much clearer to see where the function came from.

The set function seems to be broken (or it's a typo), I had to replace it with the setp function to get the demo to run.

Below it the results of diff between my working version of the demo and the original that won't run:

ยทยทยท

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

8c8,10
< from pylab import dates, YEARLY, drange, rand, subplot, plot_date, setp, show
---
> from pylab import *
> from matplotlib.dates import YEARLY, DateFormatter, \
> rrulewrapper, RRuleLocator, drange
11d12
<
13,15c14,16
< rule = dates.rrulewrapper(YEARLY, byeaster=1, interval=5)
< loc = dates.RRuleLocator(rule)
< formatter = dates.DateFormatter('%m/%d/%y')
---
> rule = rrulewrapper(YEARLY, byeaster=1, interval=5)
> loc = RRuleLocator(rule)
> formatter = DateFormatter('%m/%d/%y')
29c30
< setp(labels, rotation=30, fontsize=10)
---
> set(labels, rotation=30, fontsize=10)
---------------------------------
Bill