@@ -172,7 +172,6 @@ class ThetaFormatter(Formatter):
172
172
unit of radians into degrees and adds a degree symbol.
173
173
"""
174
174
def __call__ (self , x , pos = None ):
175
- # \u00b0 : degree symbol
176
175
if rcParams ['text.usetex' ] and not rcParams ['text.latex.unicode' ]:
177
176
return r"$%0.0f^\circ$" % ((x / np .pi ) * 180.0 )
178
177
else :
@@ -181,7 +180,7 @@ def __call__(self, x, pos=None):
181
180
# (assuming it has a degree sign), whereas $5\circ$
182
181
# will only work correctly with one of the supported
183
182
# math fonts (Computer Modern and STIX)
184
- return "%0.0f\u00b0 " % ((x / np .pi ) * 180.0 )
183
+ return "%0.0f\N{DEGREE SIGN} " % ((x / np .pi ) * 180.0 )
185
184
186
185
187
186
class RadialLocator (Locator ):
@@ -592,10 +591,8 @@ def format_coord(self, theta, r):
592
591
characters.
593
592
"""
594
593
theta /= math .pi
595
- # \u03b8: lower-case theta
596
- # \u03c0: lower-case pi
597
- # \u00b0: degree symbol
598
- return '\u03b8 =%0.3f\u03c0 (%0.3f\u00b0 ), r=%0.3f' % (theta , theta * 180.0 , r )
594
+ return ('\N{GREEK SMALL LETTER THETA} =%0.3f\N{GREEK SMALL LETTER PI} '
595
+ '(%0.3f\N{DEGREE SIGN} ), r=%0.3f' ) % (theta , theta * 180.0 , r )
599
596
600
597
def get_data_ratio (self ):
601
598
'''
0 commit comments