|
From: Michael D. <md...@st...> - 2010-04-29 16:19:27
|
That is indeed a bug. This has now been fixed in SVN r8288. You can apply this patch to your local copy if you aren't running from SVN: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=8288 Mike On 04/28/2010 09:29 PM, Shrividya Ravi wrote: > 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) > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |