From: <ds...@us...> - 2008-06-30 23:14:47
|
Revision: 5701 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5701&view=rev Author: dsdale Date: 2008-06-30 16:14:42 -0700 (Mon, 30 Jun 2008) Log Message: ----------- another attempt to fix TextWithDash Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-06-30 13:24:13 UTC (rev 5700) +++ trunk/matplotlib/CHANGELOG 2008-06-30 23:14:42 UTC (rev 5701) @@ -1,3 +1,5 @@ +2008-06-30 Another attempt to fix TextWithDash - DSD + 2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to have been unnecessary and caused a bug reported by P. Raybaut - DSD Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-06-30 13:24:13 UTC (rev 5700) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-06-30 23:14:42 UTC (rev 5701) @@ -298,7 +298,12 @@ bbox, info = self._get_layout(renderer) trans = self.get_transform() - posx, posy = self.get_position() + + # don't use self.get_position here, which refers to text position + # in Text, and dash position in TextWithDash: + posx = float(self.convert_xunits(self._x)) + posy = float(self.convert_yunits(self._y)) + posx, posy = trans.transform_point((posx, posy)) canvasw, canvash = renderer.get_canvas_width_height() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |