You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: AxisInfo needs data readout formatter, e.g. for dates. #7819
The AutoDateFormatter handles the tick labels in a sensible way, but by default it is used for the data readout (e.g., Axes.fmt_xdata). As a result the data readout is highly discretized rather than quasi-continuous. This should handled automatically by dates.DateConverter specifying a suitable alternative formatter for the readout in the AxesInfo object it provides. This requires expanding AxesInfo and everything working with to support this additional (optional) information.
In the case of datetimes, one approach for the readout would be to use floating point instead of integer for the least-significant element of the tick format string. For example, if the ticks are formatted as integer year-month-days, the readout could be the same but with floating point days, perhaps 2 digits after the decimal.
I'm a bit confused as to how this isn't already handled in axesinfo since axesinfo takes both a major and minor formatter and that information is specified in dates.py...
The data readout, by default, comes from the formatter format_data_short, which calls format_data, which calls __call__. The solution for dates is probably to override the format_data_short method.
There might be a better name, but what I am calling the data readout is the cursor position output in the status line, showing x and y values of the cursor location in data coordinates.
Activity
story645 commentedon Jan 16, 2017
I'm a bit confused as to how this isn't already handled in axesinfo since axesinfo takes both a major and minor formatter and that information is specified in dates.py...
efiring commentedon Jan 16, 2017
The data readout, by default, comes from the formatter
format_data_short, which callsformat_data, which calls__call__. The solution for dates is probably to override theformat_data_shortmethod.story645 commentedon Jan 16, 2017
I think I'm a step behind. What is the data readout and how does it differ from the ticklabeling?
efiring commentedon Jan 16, 2017
There might be a better name, but what I am calling the data readout is the cursor position output in the status line, showing x and y values of the cursor location in data coordinates.
story645 commentedon Jan 17, 2017
Thanks, much clearer now, and something I'm 👍 on.
jklymak commentedon Mar 24, 2018
#10841 makes this just be the full datestring. Its not like the readout is short of space...
anntzer commentedon Dec 7, 2020
AFAICT this has indeed been fixed by #10841. Whether to make ConciseDateFormatter the default formatter is another question...