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