From f53ee4d641d451ae61b2eaa2f95336b6c7cdd2ad Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 23 Nov 2015 23:30:27 -0800 Subject: [PATCH] Use shorter float repr in figure options dialog. On Python3, native float repr is as short as possible. Moreover, no precision is lost as {x,y}lims are already internally represented as numpy floats of the same size as the native floats. See #4839. --- lib/matplotlib/backends/qt_editor/figureoptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/qt_editor/figureoptions.py b/lib/matplotlib/backends/qt_editor/figureoptions.py index 4882d8b8dd6a..f2fc9e115efc 100644 --- a/lib/matplotlib/backends/qt_editor/figureoptions.py +++ b/lib/matplotlib/backends/qt_editor/figureoptions.py @@ -46,8 +46,8 @@ def figure_edit(axes, parent=None): has_curve = len(axes.get_lines()) > 0 # Get / General - xmin, xmax = axes.get_xlim() - ymin, ymax = axes.get_ylim() + xmin, xmax = map(float, axes.get_xlim()) + ymin, ymax = map(float, axes.get_ylim()) general = [('Title', axes.get_title()), sep, (None, "X-Axis"),