Skip to content

Commit d65bb77

Browse files
authored
Merge pull request matplotlib#19909 from anntzer/3du
Use unicode when interactively displaying 3d azim/elev.
2 parents 10672f4 + 90c8ba8 commit d65bb77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,10 @@ def format_coord(self, xd, yd):
12431243
return ''
12441244

12451245
if self.button_pressed in self._rotate_btn:
1246-
return 'azimuth={:.0f} deg, elevation={:.0f} deg '.format(
1247-
self.azim, self.elev)
12481246
# ignore xd and yd and display angles instead
1247+
return (f"azimuth={self.azim:.0f}\N{DEGREE SIGN}, "
1248+
f"elevation={self.elev:.0f}\N{DEGREE SIGN}"
1249+
).replace("-", "\N{MINUS SIGN}")
12491250

12501251
# nearest edge
12511252
p0, p1 = min(self.tunit_edges(),

0 commit comments

Comments
 (0)