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

[Bug]: Should Axes.set_xlim(..., emit=False) really not sync shared axes? #26085

Open
@anntzer

Description

@anntzer

Bug summary

Currently, callingax.set_xlim(..., emit=False) explicitly does not sync the xlims to other axes that are sharex with ax (i.e. the other axes keep their previous limits). This isn't really an accident of implementation, but is rather explicitly implemented at the bottom of Axis._set_lim.

However, this leads to buggy behavior, e.g. tick locators, which are shared between sharex axes, mis-handled being simultaneously assigned to two axes with different limits.

Code for reproduction

fig,axs=subplots(1,2,sharex=True);axs[0].set_xlim((0,.1),emit=False)

Actual outcome

test
Note the nonsensical ticks on the second axis, which still have limits of (0, 1) but uses a tick locator which thinks the limits are (0, 0.1).

Expected outcome

Probably syncing with sharex axes should always be done, even when emit=False.

Additional information

No response

Operating system

No response

Matplotlib Version

3.8.0.dev1236+gfc350ea534

Matplotlib Backend

any

Python version

3.11

Jupyter version

No response

Installation

git checkout

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