SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

From: <jd...@us...> - 2007年10月15日 21:22:07
Revision: 3952
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3952&view=rev
Author: jdh2358
Date: 2007年10月15日 14:22:03 -0700 (2007年10月15日)
Log Message:
-----------
fixed a unit problem with annotations
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2007年10月15日 21:08:35 UTC (rev 3951)
+++ trunk/matplotlib/lib/matplotlib/text.py	2007年10月15日 21:22:03 UTC (rev 3952)
@@ -1077,6 +1077,8 @@
 def _get_xy(self, x, y, s):
 if s=='data':
 trans = self.axes.transData
+ x = float(self.convert_xunits(x))
+ y = float(self.convert_yunits(y))
 return trans.xy_tup((x,y))
 elif s=='polar':
 theta, r = x, y
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jr...@us...> - 2007年12月06日 00:04:51
Revision: 4636
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4636&view=rev
Author: jrevans
Date: 2007年12月05日 16:04:49 -0800 (2007年12月05日)
Log Message:
-----------
Added a 'data offset' coordinate to the Annotation class.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2007年12月05日 23:01:05 UTC (rev 4635)
+++ trunk/matplotlib/lib/matplotlib/text.py	2007年12月06日 00:04:49 UTC (rev 4636)
@@ -1080,6 +1080,24 @@
 x = float(self.convert_xunits(x))
 y = float(self.convert_yunits(y))
 return trans.xy_tup((x,y))
+ 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))
+
+ # convert the offset
+ dpi = self.figure.dpi.get()
+ x *= dpi/72.
+ y *= dpi/72.
+
+ # add the offset to the data point
+ x += dx
+ y += dy
+
+ return x, y
 elif s=='polar':
 theta, r = x, y
 x = r*npy.cos(theta)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jr...@us...> - 2007年12月06日 00:09:50
Revision: 4637
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4637&view=rev
Author: jrevans
Date: 2007年12月05日 16:09:49 -0800 (2007年12月05日)
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.
From: <md...@us...> - 2007年12月12日 14:52:52
Revision: 4707
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4707&view=rev
Author: mdboom
Date: 2007年12月12日 06:52:01 -0800 (2007年12月12日)
Log Message:
-----------
Support fontconfig syntax in Text constructor.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2007年12月12日 14:08:15 UTC (rev 4706)
+++ trunk/matplotlib/lib/matplotlib/text.py	2007年12月12日 14:52:01 UTC (rev 4707)
@@ -675,6 +675,8 @@
 
 ACCEPTS: a matplotlib.font_manager.FontProperties instance
 """
+ if is_string_like(fp):
+ fp = FontProperties(fp)
 self._fontproperties = fp
 
 artist.kwdocd['Text'] = artist.kwdoc(Text)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月11日 15:31:23
Revision: 5470
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5470&view=rev
Author: jdh2358
Date: 2008年06月11日 08:31:21 -0700 (2008年6月11日)
Log Message:
-----------
fixed a text layout bug where layout was cached between renderers
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年06月11日 12:37:21 UTC (rev 5469)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年06月11日 15:31:21 UTC (rev 5470)
@@ -394,7 +394,7 @@
 return (x, y, self._text, self._color,
 self._verticalalignment, self._horizontalalignment,
 hash(self._fontproperties), self._rotation,
- self._renderer.dpi
+ self._renderer.dpi, id(self._renderer)
 )
 
 def get_text(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月28日 13:50:51
Revision: 5697
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5697&view=rev
Author: jdh2358
Date: 2008年06月28日 06:50:45 -0700 (2008年6月28日)
Log Message:
-----------
reverting text with dash fixes; see post on mailing list
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年06月28日 01:10:58 UTC (rev 5696)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年06月28日 13:50:45 UTC (rev 5697)
@@ -745,8 +745,8 @@
 
 def get_position(self):
 "Return x, y as tuple"
- x = float(self.convert_xunits(self._x))
- y = float(self.convert_yunits(self._y))
+ x = float(self.convert_xunits(self._dashx))
+ y = float(self.convert_yunits(self._dashy))
 return x, y
 
 def get_prop_tup(self):
@@ -939,8 +939,7 @@
 
 ACCEPTS: float
 """
- self._x = float(x)
- self._dashx = self._x
+ self._dashx = float(x)
 
 def set_y(self, y):
 """
@@ -948,8 +947,7 @@
 
 ACCEPTS: float
 """
- self._y = float(y)
- self._dashy = self._y
+ self._dashy = float(y)
 
 def set_transform(self, t):
 """
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /