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

Should scale changes respect previously explicitly set tickers and formatters? #18572

Open
@anntzer

Description

@anntzer

Bug report

Bug summary

Units (e.g. datetime) and scales (e.g. log) both come with their own default locators (various DateLocators, LogLocator) and formatters (various DateFormatters, LogFormatter), which are being set inAxis._update_axisinfo andAxis.set_scale, respectively.

If a locator or formatter hasalready been manually set on the axis, then setting units willnot override the user-set locator/formatter -- this is tracked using the slighly awkwardly namedisDefault_{maj,min}{loc,fmt}. On the other hand, setting a scalewill override locator/formatters previously set.

Code for reproduction

frompylabimport*subplot(121)xticks([])xscale("log")subplot(122)xticks([])plot_date([1,2], [3,4])show()

Actual outcome

test

Expected outcome

Consistent behavior between the two cases.#18571 (comment) is one where scales also respecting user-set locators/formatters would be nice, but I can also see an argument for the opposite behavior for simplicity...

Matplotlib version

  • Operating system: linux
  • Matplotlib version: HEAD
  • Matplotlib backend (print(matplotlib.get_backend())): any
  • Python version: 38
  • Jupyter version (if applicable):
  • Other libraries:

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