Hi all,
I am having a problem having both a vspan and a legend in a figure plotted on a semilog axis. A simple code that gives the following error is shown in red:
ERROR
return self.frozen().__array__()
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1051, in array
return self.frozen().array()
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1706, in frozen
return blended_transform_factory(self._x.frozen(), self._y.frozen())
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1875, in frozen
frozen = composite_transform_factory(self._a.frozen(), self._b.frozen())
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1367, in frozen
return Affine2D(self.get_matrix().copy())
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1451, in init
Affine2DBase.init(self)
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 1304, in init
Transform.init(self)
File “/usr/lib/pymodules/python2.6/matplotlib/transforms.py”, line 87, in init
self._parents = WeakKeyDictionary()
File “/usr/lib/python2.6/weakref.py”, line 232, in init
def remove(k, selfref=ref(self)):
RuntimeError: maximum recursion depth exceeded while calling a Python object
CODE
x = numpy.arange(10,1e8,1000)
y = numpy.arange(0,100,0.001)
pylab.semilogx(x,y,‘bo’, label=“Plot 1”)
pylab.legend(loc=‘best’)
pylab.axvspan(20,2e3,facecolor=‘k’,alpha0.2)