Revision: 6483
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6483&view=rev
Author: mdboom
Date: 2008-12-03 15:33:53 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
Fix degree display in geographic transforms, also.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/geo.py
Modified: trunk/matplotlib/lib/matplotlib/projections/geo.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/geo.py 2008-12-03 09:07:27 UTC
(rev 6482)
+++ trunk/matplotlib/lib/matplotlib/projections/geo.py 2008-12-03 15:33:53 UTC
(rev 6483)
@@ -29,8 +29,10 @@
def __call__(self, x, pos=None):
degrees = (x / np.pi) * 180.0
degrees = round(degrees / self._round_to) * self._round_to
- # \u00b0 : degree symbol
- return u"%d\u00b0" % degrees
+ if rcParams['text.usetex'] and not rcParams['text.latex.unicode']:
+ return r"$%0.0f^\circ$" % degrees
+ else:
+ return u"%0.0f\u00b0" % degrees
RESOLUTION = 75
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins