Hello,
I think there is an unused parameter in matplotlibrc, the text.markup which defaults to 'plain'. text.markup is not found in rcsetup.py.
Similarly, there is a keyword to ScalarFormatter, useMathText, that is always set to its default, False, in ticker.py; no other function accesses or uses that keyword. It seems that could be eliminated without ill-effect.
I came across this while looking for a way to have the tick formatter include a multiplication sign when writing very large numbers, instead of using engineering notation such as 1e10. I would like to be able to do this using the mathtext facilities native to matplotlib, and not have to resort to usetex.
The following diff changes the tick formatter to work as I would like it, but it also probably breaks something else because I have not tested it at all. Please consider it as a starting point.
Paul
Index: ticker.py
···
===================================================================
--- ticker.py (revision 7225)
+++ ticker.py (working copy)
@@ -384,18 +384,10 @@
offsetStr = self.format_data(self.offset)
if self.offset > 0: offsetStr = '+' + offsetStr
if self.orderOfMagnitude:
- if self._usetex or self._useMathText:
- sciNotStr = self.format_data(10**self.orderOfMagnitude)
- else:
- sciNotStr = '1e%d'% self.orderOfMagnitude
- if self._useMathText:
- if sciNotStr != '':
- sciNotStr = r'\times\mathdefault{%s}' % sciNotStr
+ sciNotStr = self.format_data(10**self.orderOfMagnitude)
+ if sciNotStr != '':
+ sciNotStr = r'\times\mathdefault{%s}' % sciNotStr
s = ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
- elif self._usetex:
- if sciNotStr != '':
- sciNotStr = r'\times%s' % sciNotStr
- s = ''.join(('$',sciNotStr,offsetStr,'$'))
else:
s = ''.join((sciNotStr,offsetStr))