Closed
Description
Problem
We often use datetimes on X axis. However, Qt backend's figure options dialog converts these to floating point numbers making it all but possible to edit the axis xmin and xmax.
Proposed Solution
Make the options dialog deal with axis units more properly, e.g. datetimes could be shown using QDateTimeEdit
widget.
I managed to get this working for datetimes and X axis on a monkey-patched options dialog by replacing line 37 in matploglib/backends/qt_editor
by
if isinstance(axes.xaxis.converter, DateConverter):
xmin, xmax = tuple(num2date(lim) for lim in axes.get_xlim())
else:
xmin, xmax = map(float, axes.get_xlim())
Would this be an acceptable way of dealing with the units in general? I would be willing to work on a Pull request on this.