Current SVN (r6540) raise an error for the following code.
import matplotlib.pyplot as plt
import matplotlib.axes as maxes
fig = plt.figure()
ax = maxes.Subplot(fig, 1, 1, 1)
fig.add_subplot(ax)
/Users/jjlee/.virtualenvs/default/lib/python2.5/site-packages/matplotlib/figure.pyc
in add_subplot(self, *args, **kwargs)
687 self._axstack.remove(ax)
688
--> 689 a = subplot_class_factory(projection_class)(self,
*args, **kwargs)
690 self.axes.append(a)
691 self._axstack.push(a)
UnboundLocalError: local variable 'projection_class' referenced before
assignment
It seems that some of the code Mike recently introduced in "figure.py"
have incorrect indentation, but I'm not 100% sure.
I'm attaching a patch which seems to work for me, and It would be
great if Mike or others review it and apply.
-JJ
figure.diff (1.35 KB)