You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, calling ax.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.
Bug summary
Currently, calling
ax.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
Actual outcome
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
The text was updated successfully, but these errors were encountered: