Skip to content

Commit

Permalink
Backport PR #12573: BUG: mplot3d: Don't crash if azim or elev are non…
Browse files Browse the repository at this point in the history
…-integral (#12575)
  • Loading branch information
meeseeksmachine authored and timhoffm committed Oct 20, 2018
1 parent 90723b4 commit 77fa285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mpl_toolkits/mplot3d/axes3d.py
Expand Up @@ -1168,7 +1168,8 @@ def format_coord(self, xd, yd):
return ''

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

# nearest edge
Expand Down

0 comments on commit 77fa285

Please sign in to comment.