More than 9 subplots in Figure?

I'm a python newbie, using matplotlib 0.87.3. My code works, as long as I limit myself to 9 subplots. But, I need more than 9.

Relevant parts of the code:

from matplotlib.figure import Figure
import pylab
f = Figure(figsize=(5,4), dpi=100)
plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar + ')')

I get an error like:
Traceback (most recent call last):
   File "", line 726, in ?
   File "", line 246, in create_mpl_plots
     plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar + ')')
   File "/sw/lib/python2.4/site-packages/matplotlib/", line 472, in add_subplot
     a = Subplot(self, *args, **kwargs)
   File "/sw/lib/python2.4/site-packages/matplotlib/", line 4316, in __init__
     SubplotBase.__init__(self, fig, *args)
   File "/sw/lib/python2.4/site-packages/matplotlib/", line 4208, in __init__
     raise ValueError('Argument to subplot must be a 3 digits long')
ValueError: Argument to subplot must be a 3 digits long

subplot accepts a tuple in other places, so I would have expected the same behaviour here. Is this a bug that is fixed in a newer matplotlib version, in which case I will try to upgrade. Or, is there some other way to do my code that will work?


Kevin Horton
Ottawa, Canada