Revision: 4638
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4638&view=rev
Author: jdh2358
Date: 2007-12-05 18:36:05 -0800 (Wed, 05 Dec 2007)
Log Message:
-----------
changed offset naming for annotations
Modified Paths:
--------------
trunk/matplotlib/examples/annotation_demo.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/examples/annotation_demo.py
===================================================================
--- trunk/matplotlib/examples/annotation_demo.py 2007-12-06 00:09:49 UTC
(rev 4637)
+++ trunk/matplotlib/examples/annotation_demo.py 2007-12-06 02:36:05 UTC
(rev 4638)
@@ -10,6 +10,7 @@
'axes points' : points from lower left corner of axes
'axes pixels' : pixels from lower left corner of axes
'axes fraction' : 0,1 is lower left of axes and 1,1 is upper right
+ 'offset points' : Specify an offset (in points) from the xy value
'data' : use the axes data coordinate system
Optionally, you can specify arrow properties which draws and arrow
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2007-12-06 00:09:49 UTC (rev
4637)
+++ trunk/matplotlib/lib/matplotlib/text.py 2007-12-06 02:36:05 UTC (rev
4638)
@@ -187,7 +187,7 @@
xmin, ymin = thisx, thisy
lines = self._text.split('\n')
-
+
whs = []
# Find full vertical extent of font,
# including ascenders and descenders:
@@ -1025,7 +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
+ 'offset points' : 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
@@ -1081,12 +1081,12 @@
x = float(self.convert_xunits(x))
y = float(self.convert_yunits(y))
return trans.xy_tup((x,y))
- elif s=='data offset':
+ elif s=='offset points':
# convert the data point
dx, dy = self.xy
# prevent recursion
- if self.xycoords == 'data offset':
+ if self.xycoords == 'offset points':
return self._get_xy(dx, dy, 'data')
dx, dy = self._get_xy(dx, dy, self.xycoords)
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