Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Good looking date/time axes with primary and secondary annotation and interval annotation #27394

Open
@eelcodoornbos

Description

@eelcodoornbos

Problem

The default matplotlib date/time axes are difficult to customize to look professional. Date values usually denote time intervals (days, months, years), but matplotlib default date labels are attached to single ticks that mark the start of that interval. And since all date/time annotations are usually put on a single axis, the labels get long, and often have to be plotted at an angle, which does not look pleasing and makes the plots more difficult to read.

Proposed solution

Good-looking and easy to read date/time axes need implementation of two features:

  • Interval labels - where the labels for years, months, week numbers and days are drawn between two adjacent tick marks
  • Primary and secondary axes that are vertically stacked, so that the top ticks/labels can denote a smaller unit of time than the bottom one.

Some excellent examples of the look that can be achieved using these two features can be seen in the cookbook of the Generic Mapping Tools:https://docs.generic-mapping-tools.org/latest/cookbook/options.html#cartesian-time-axes

The "interval labels" feature could also be made reusable for custom interval annotations, like in the further example on that website:https://docs.generic-mapping-tools.org/latest/cookbook/options.html#custom-axes

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp