diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 45bbb001fc8b..f6ae8a8ff6ce 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -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