@@ -172,7 +172,6 @@ class ThetaFormatter(Formatter):
172172 unit of radians into degrees and adds a degree symbol.
173173 """
174174 def __call__ (self , x , pos = None ):
175- # \u00b0 : degree symbol
176175 if rcParams ['text.usetex' ] and not rcParams ['text.latex.unicode' ]:
177176 return r"$%0.0f^\circ$" % ((x / np .pi ) * 180.0 )
178177 else :
@@ -181,7 +180,7 @@ def __call__(self, x, pos=None):
181180 # (assuming it has a degree sign), whereas $5\circ$
182181 # will only work correctly with one of the supported
183182 # 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 )
185184
186185
187186class RadialLocator (Locator ):
@@ -592,10 +591,8 @@ def format_coord(self, theta, r):
592591 characters.
593592 """
594593 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 )
599596
600597 def get_data_ratio (self ):
601598 '''
0 commit comments