Revision: 4637
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4637&view=rev
Author: jrevans
Date: 2007-12-05 16:09:49 -0800 (Wed, 05 Dec 2007)
Log Message:
-----------
Submitted the wrong version. This is the correct one.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2007-12-06 00:04:49 UTC (rev
4636)
+++ trunk/matplotlib/lib/matplotlib/text.py 2007-12-06 00:09:49 UTC (rev
4637)
@@ -1025,6 +1025,7 @@
'axes pixels' : pixels from lower left corner of axes
'axes fraction' : 0,1 is lower left of axes and 1,1 is upper right
'data' : use the coordinate system of the object being
annotated (default)
+ 'data offset' : Specify an offset (in points) from the xy value
'polar' : you can specify theta, r for the annotation,
even
in cartesian plots. Note that if you
are using a polar axes, you do not need
@@ -1083,11 +1084,13 @@
elif s=='data offset':
# convert the data point
dx, dy = self.xy
- trans = self.axes.transData
- dx = float(self.convert_xunits(dx))
- dy = float(self.convert_yunits(dy))
- dx, dy = trans.xy_tup((dx, dy))
+ # prevent recursion
+ if self.xycoords == 'data offset':
+ return self._get_xy(dx, dy, 'data')
+
+ dx, dy = self._get_xy(dx, dy, self.xycoords)
+
# convert the offset
dpi = self.figure.dpi.get()
x *= dpi/72.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins