Revision: 4841
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4841&view=rev
Author: mdboom
Date: 2008-01-10 05:28:01 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Fix offset labels (so the times symbol is displayed correctly)
Modified Paths:
--------------
branches/v0_91_maint/lib/matplotlib/ticker.py
Modified: branches/v0_91_maint/lib/matplotlib/ticker.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/ticker.py 2008-01-10 13:26:35 UTC
(rev 4840)
+++ branches/v0_91_maint/lib/matplotlib/ticker.py 2008-01-10 13:28:01 UTC
(rev 4841)
@@ -329,12 +329,16 @@
if self.offset > 0: offsetStr = '+' + offsetStr
if self.orderOfMagnitude:
if self._usetex or self._useMathText:
- sciNotStr =
r'{\times}'+self.format_data(10**self.orderOfMagnitude)
+ sciNotStr = self.format_data(10**self.orderOfMagnitude)
else:
- sciNotStr = u'\xd7'+'1e%d'% self.orderOfMagnitude
+ sciNotStr = '1e%d'% self.orderOfMagnitude
if self._useMathText:
- return ''.join(('$\mathdefault{',sciNotStr,offsetStr,'}$'))
+ if sciNotStr != '':
+ sciNotStr = r'\times\mathdefault{%s}' % sciNotStr
+ return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
elif self._usetex:
+ if sciNotStr != '':
+ sciNotStr = u'\xd7%s' % sciNotStr
return ''.join(('$',sciNotStr,offsetStr,'$'))
else:
return ''.join((sciNotStr,offsetStr))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins