Title: [Bug]: Should Axes.set_xlim(..., emit=False) really not sync shared axes? · Issue #26085 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Should Axes.set_xlim(..., emit=False) really not sync shared axes? · Issue #26085 · matplotlib/matplotlib
X Title: [Bug]: Should Axes.set_xlim(..., emit=False) really not sync shared axes? · Issue #26085 · matplotlib/matplotlib
Description: 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 i...
Open Graph Description: 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 rea...
X Description: 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...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26085
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Should Axes.set_xlim(..., emit=False) really not sync shared axes?","articleBody":"### Bug summary\n\nCurrently, 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.\r\n\r\nHowever, 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.\n\n### Code for reproduction\n\n```python\nfig, axs = subplots(1, 2, sharex=True); axs[0].set_xlim((0, .1), emit=False)\n```\n\n\n### Actual outcome\n\n\r\nNote 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).\n\n### Expected outcome\n\nProbably syncing with sharex axes should always be done, even when emit=False.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.8.0.dev1236+gfc350ea534\n\n### Matplotlib Backend\n\nany\n\n### Python version\n\n3.11\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2023-06-07T17:07:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/26085/matplotlib/issues/26085"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ebc7feb5-aa9e-d2db-8f19-5f526897fbd7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E14E:1AC24:477146E:64ADCB4:6A56E62D |
| html-safe-nonce | d928a3b1aebc92a34f32bb907030a6fd063983aae9ca616f3c9f7245d7957f3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTRFOjFBQzI0OjQ3NzE0NkU6NjRBRENCNDo2QTU2RTYyRCIsInZpc2l0b3JfaWQiOiI5MDEwMDc4MzYyMDgyMTQxNzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 88ad2d2a349b684999495f7adf37364dbc5f89f429abde7d2b90bfc18e8d89be |
| hovercard-subject-tag | issue:1746342097 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/26085/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a352abbf19732c0b57247ae6f83916260e175b95f5e2e0af156ec2a19f6de950/matplotlib/matplotlib/issues/26085 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a352abbf19732c0b57247ae6f83916260e175b95f5e2e0af156ec2a19f6de950/matplotlib/matplotlib/issues/26085 |
| og:image:alt | 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 rea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5220a278731283038daf0ed00b41f06ef7ff9539020ecc806c5c5a0fb6bda25a |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8684ae1a81cd3e4ef219b241179982bbda1a5b1f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width