FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ENH: AxisInfo needs data readout formatter, e.g. for dates. · Issue #7819 · matplotlib/matplotlib · GitHub

Repository navigation

ENH: AxisInfo needs data readout formatter, e.g. for dates. #7819

Closed

Description

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.

Activity

  1. added this to the milestone on Jan 13, 2017
  2. story645 commented on Jan 16, 2017

    Member

    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...

  3. efiring commented on Jan 16, 2017

    MemberAuthor

    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.

  4. story645 commented on Jan 16, 2017

    Member

    I think I'm a step behind. What is the data readout and how does it differ from the ticklabeling?

  5. efiring commented on Jan 16, 2017

    MemberAuthor

    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.

  6. story645 commented on Jan 17, 2017

    Member

    Thanks, much clearer now, and something I'm 👍 on.

  7. jklymak commented on Mar 24, 2018

    Member

    #10841 makes this just be the full datestring. Its not like the readout is short of space...

  8. anntzer commented on Dec 7, 2020

    Contributor

    AFAICT this has indeed been fixed by #10841. Whether to make ConciseDateFormatter the default formatter is another question...

  9. removed this from the future releases milestone on Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL