Revision: 3896
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3896&view=rev
Author: mdboom
Date: 2007-09-26 06:55:41 -0700 (Wed, 26 Sep 2007)
Log Message:
-----------
Merged revisions 3885-3895 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib
........
r3894 | mdboom | 2007-09-26 09:41:15 -0400 (Wed, 26 Sep 2007) | 3 lines
Bugfix: Display exponents in tick values in the default font (not the
default math font)
........
Modified Paths:
--------------
branches/transforms/lib/matplotlib/mathtext.py
branches/transforms/lib/matplotlib/ticker.py
Property Changed:
----------------
branches/transforms/
Property changes on: branches/transforms
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/matplotlib:1-3884
+ /trunk/matplotlib:1-3895
Modified: branches/transforms/lib/matplotlib/mathtext.py
===================================================================
--- branches/transforms/lib/matplotlib/mathtext.py 2007-09-26 13:53:53 UTC
(rev 3895)
+++ branches/transforms/lib/matplotlib/mathtext.py 2007-09-26 13:55:41 UTC
(rev 3896)
@@ -1855,7 +1855,7 @@
"tanh")
fontname = oneOf("rm cal it tt sf bf")
- latex2efont = oneOf("mathrm mathcal mathit mathtt mathsf mathbf")
+ latex2efont = oneOf("mathrm mathcal mathit mathtt mathsf mathbf
mathdefault")
space =(FollowedBy(bslash)
+ (Literal(r'\ ')
Modified: branches/transforms/lib/matplotlib/ticker.py
===================================================================
--- branches/transforms/lib/matplotlib/ticker.py 2007-09-26 13:53:53 UTC
(rev 3895)
+++ branches/transforms/lib/matplotlib/ticker.py 2007-09-26 13:55:41 UTC
(rev 3896)
@@ -300,9 +300,12 @@
sciNotStr =
r'{\times}'+self.format_data(10**self.orderOfMagnitude)
else:
sciNotStr = u'\xd7'+'1e%d'% self.orderOfMagnitude
- if self._useMathText or self._usetex:
+ if self._useMathText:
+ return ''.join(('$\mathdefault{',sciNotStr,offsetStr,'}$'))
+ elif self._usetex:
return ''.join(('$',sciNotStr,offsetStr,'$'))
- else: return ''.join((sciNotStr,offsetStr))
+ else:
+ return ''.join((sciNotStr,offsetStr))
else: return ''
def set_locs(self, locs):
@@ -363,8 +366,11 @@
for loc in locs]
sigfigs.sort()
self.format = '%1.' + str(sigfigs[-1]) + 'f'
- if self._usetex or self._useMathText: self.format = '$%s$'%self.format
-
+ if self._usetex:
+ self.format = '$%s$' % self.format
+ elif self._useMathText:
+ self.format = '$\mathdefault{%s}$' % self.format
+
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if npy.absolute(xp) < 1e-8: xp = 0
@@ -511,11 +517,13 @@
elif not isDecade:
if usetex:
s = r'$%d^{%.2f}$'% (b, fx)
- else: s = '$%d^{%.2f}$'% (b, fx)
+ else:
+ s = '$\mathdefault{%d^{%.2f}}$'% (b, fx)
else:
if usetex:
s = r'$%d^{%d}$'% (b, self.nearest_long(fx))
- else: s = r'$%d^{%d}$'% (b, self.nearest_long(fx))
+ else:
+ s = r'$\mathdefault{%d^{%d}}$'% (b, self.nearest_long(fx))
return s
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins