Revision: 5889 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5889&view=rev Author: pkienzle Date: 2008-07-26 19:19:35 +0000 (Sat, 26 Jul 2008)
Log Message: ----------- support unicode when printing Text artist with str(artist) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-07-26 19:17:05 UTC (rev 5888) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-07-26 19:19:35 UTC (rev 5889) @@ -83,7 +83,7 @@ """ zorder = 3 def __str__(self): - return "Text(%g,%g,%s)"%(self._y,self._y,self._text) + return "Text(%g,%g,%s)"%(self._y,self._y,repr(self._text)) def __init__(self, x=0, y=0, text='', @@ -135,7 +135,7 @@ """ if callable(self._contains): return self._contains(self,mouseevent) - if not self.get_visible() or self._renderer is None: + if not self.get_visible() or self._renderer is None: return False,{} l,b,w,h = self.get_window_extent().bounds @@ -703,7 +703,7 @@ __name__ = 'textwithdash' def __str__(self): - return "TextWithDash(%g,%g,%s)"%(self._x,self._y,self._text) + return "TextWithDash(%g,%g,%s)"%(self._x,self._y,repr(self._text)) def __init__(self, x=0, y=0, text='', color=None, # defaults to rc params @@ -986,7 +986,7 @@ :class:`~matplotlib.patches.Rectangle`, etc., easier. """ def __str__(self): - return "Annotation(%g,%g,%s)"%(self.xy[0],self.xy[1],self._text) + return "Annotation(%g,%g,%s)"%(self.xy[0],self.xy[1],repr(self._text)) def __init__(self, s, xy, xytext=None, xycoords='data', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins