Re: [Matplotlib-users] problem / bug with LogLocator in rev8732
On Thursday October 7 2010 12:06:26 Matthias Michler wrote: Hello list, I run into trouble with the resent svn version using logarithmic scaling as before. This is probably due to the changes from rev 8730 to 8732, where in the ticker,py the line ticklocs = self._transform. ... was added. Running my program I get the following AttributeError: File /scratch/michler/SOFT/lib/python2.6/site- packages/matplotlib/ticker.py, line 1272, in __call__ ticklocs = self._transform.inverted().transform(decades) AttributeError: LogLocator instance has no attribute '_transform' Did I miss anything or is this new feature in an unstable state? Hello list, I would like to propose the attached patch for the error I encountered recently. Could anybody check this, please? Kind regards and thanks in advance, Matthias Index: lib/matplotlib/ticker.py === --- lib/matplotlib/ticker.py (revision 8732) +++ lib/matplotlib/ticker.py (working copy) @@ -1269,7 +1269,7 @@ decades = np.arange(math.floor(vmin), math.ceil(vmax)+stride, stride) -ticklocs = self._transform.inverted().transform(decades) +ticklocs = self.axis.get_transform().inverted().transform(decades) if len(subs) 1 or (len(subs == 1) and subs[0] != 1.0): ticklocs = np.ravel(np.outer(subs, ticklocs)) -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem / bug with LogLocator in rev8732
Hello list, I run into trouble with the resent svn version using logarithmic scaling as before. This is probably due to the changes from rev 8730 to 8732, where in the ticker,py the line ticklocs = self._transform. ... was added. Running my program I get the following AttributeError: File /scratch/michler/SOFT/lib/python2.6/site- packages/matplotlib/ticker.py, line 1272, in __call__ ticklocs = self._transform.inverted().transform(decades) AttributeError: LogLocator instance has no attribute '_transform' Did I miss anything or is this new feature in an unstable state? Kind regards, Matthias -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem / bug with LogLocator in rev8732
Thanks for bringing this to my attention. The fix was for symlog, but inadvertently broke log. Your suggested fix is nice, but it doesn't have exactly the same behavior as what it used to do. My fix (in r8733) is to basically restore the old code in the case of regular log, and only use the new code for symlog. Mike On 10/07/2010 06:19 AM, Matthias Michler wrote: On Thursday October 7 2010 12:06:26 Matthias Michler wrote: Hello list, I run into trouble with the resent svn version using logarithmic scaling as before. This is probably due to the changes from rev 8730 to 8732, where in the ticker,py the line ticklocs = self._transform. ... was added. Running my program I get the following AttributeError: File /scratch/michler/SOFT/lib/python2.6/site- packages/matplotlib/ticker.py, line 1272, in __call__ ticklocs = self._transform.inverted().transform(decades) AttributeError: LogLocator instance has no attribute '_transform' Did I miss anything or is this new feature in an unstable state? Hello list, I would like to propose the attached patch for the error I encountered recently. Could anybody check this, please? Kind regards and thanks in advance, Matthias -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users