Skip to content

Commit 77fa285

Browse files
meeseeksmachinetimhoffm
authored andcommitted
Backport PR #12573: BUG: mplot3d: Don't crash if azim or elev are non-integral (#12575)
1 parent 90723b4 commit 77fa285

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,8 @@ def format_coord(self, xd, yd):
11681168
return ''
11691169

11701170
if self.button_pressed in self._rotate_btn:
1171-
return 'azimuth=%d deg, elevation=%d deg ' % (self.azim, self.elev)
1171+
return 'azimuth={:.0f} deg, elevation={:.0f} deg '.format(
1172+
self.azim, self.elev)
11721173
# ignore xd and yd and display angles instead
11731174

11741175
# nearest edge

0 commit comments

Comments
 (0)