Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e231439

Browse files
authored
Merge pull request #12573 from eric-wieser/fractional-view-angle
BUG: mplot3d: Don't crash if azim or elev are non-integral
2 parents 682fe2c + 00844f9 commit e231439

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,8 @@ def format_coord(self, xd, yd):
11691169
return ''
11701170

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

11751176
# nearest edge

0 commit comments

Comments
 (0)