Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e100d14

Browse filesBrowse files
Normalize the displayed angles for 3d plots when rotating with mouse
1 parent a851eff commit e100d14
Copy full SHA for e100d14

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,9 +1214,9 @@ def format_coord(self, xd, yd):
12141214

12151215
if self.button_pressed in self._rotate_btn:
12161216
# ignore xd and yd and display angles instead
1217-
return (f"azimuth={self.azim:.0f}\N{DEGREE SIGN}, "
1218-
f"elevation={self.elev:.0f}\N{DEGREE SIGN}, "
1219-
f"roll={self.roll:.0f}\N{DEGREE SIGN}"
1217+
return (f"azimuth={art3d._norm_angle(self.azim):.0f}\N{DEGREE SIGN}, "
1218+
f"elevation={art3d._norm_angle(self.elev):.0f}\N{DEGREE SIGN}, "
1219+
f"roll={art3d._norm_angle(self.roll):.0f}\N{DEGREE SIGN}"
12201220
).replace("-", "\N{MINUS SIGN}")
12211221

12221222
# nearest edge

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.