diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 0a8103287110..c72ebde234e9 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -1169,7 +1169,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