-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: AxisInfo needs data readout formatter, e.g. for dates. #7819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 |
I think I'm a step behind. What is the data readout and how does it differ from the ticklabeling? |
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. |
Thanks, much clearer now, and something I'm 👍 on. |
#10841 makes this just be the full datestring. Its not like the readout is short of space... |
AFAICT this has indeed been fixed by #10841. Whether to make ConciseDateFormatter the default formatter is another question... |
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 bydates.DateConverter
specifying a suitable alternative formatter for the readout in theAxesInfo
object it provides. This requires expandingAxesInfo
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.
The text was updated successfully, but these errors were encountered: