From: <jd...@us...> - 2008-05-28 16:41:23
|
Revision: 5287 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5287&view=rev Author: jdh2358 Date: 2008-05-28 09:41:21 -0700 (Wed, 28 May 2008) Log Message: ----------- use unicode minus rather than hyphen Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-05-28 15:33:03 UTC (rev 5286) +++ trunk/matplotlib/CHANGELOG 2008-05-28 16:41:21 UTC (rev 5287) @@ -1,3 +1,6 @@ +2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in + http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720 + 2008-05-28 zero width/height Rectangles no longer influence the autoscaler. Useful for log histograms with empty bins - JDH Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 15:33:03 UTC (rev 5286) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:41:21 UTC (rev 5287) @@ -408,7 +408,7 @@ def pprint_val(self, x): xp = (x-self.offset)/10**self.orderOfMagnitude if np.absolute(xp) < 1e-8: xp = 0 - return self.format % xp + return (self.format % xp).replace('-', u'\u2212') def _formatSciNotation(self, s): # transform 1e+004 into 1e4, for example @@ -422,13 +422,13 @@ # reformat 1x10^y as 10^y significand = '' if exponent: - exponent = '10^{%s%s}'%(sign, exponent) + exponent = u'10^{%s%s}'%(sign, exponent) if significand and exponent: return r'%s{\times}%s'%(significand, exponent) else: return r'%s%s'%(significand, exponent) else: - return ('%se%s%s' %(significand, sign, exponent)).rstrip('e') + return (u'%se%s%s' %(significand, sign.replace('-', u'\u2212'), exponent)).rstrip('e') except IndexError, msg: return s This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |