From: <jd...@us...> - 2008-05-29 15:55:57
|
Revision: 5302 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5302&view=rev Author: jdh2358 Date: 2008-05-29 08:55:55 -0700 (Thu, 29 May 2008) Log Message: ----------- turned off unicode minus for usetex Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-29 15:13:52 UTC (rev 5301) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-29 15:55:55 UTC (rev 5302) @@ -179,7 +179,7 @@ """ some classes may want to replace a hyphen for minus with the proper unicode symbol as described here - + http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720. The default is to do nothing @@ -191,7 +191,7 @@ should have an explicit format_data_short method """ return s - + class NullFormatter(Formatter): 'Always return the empty string' def __call__(self, x, pos=None): @@ -303,7 +303,8 @@ def fix_minus(self, s): 'use a unicode minus rather than hyphen' - return s.replace('-', u'\u2212') + if rcParams['text.usetex']: return s + else: return s.replace('-', u'\u2212') def __call__(self, x, pos=None): 'Return the format for tick val x at position pos' @@ -366,7 +367,7 @@ s = ''.join(('$',sciNotStr,offsetStr,'$')) else: s = ''.join((sciNotStr,offsetStr)) - + return self.fix_minus(s) def set_locs(self, locs): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |