Title: [ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective · Issue #31406 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective · Issue #31406 · matplotlib/matplotlib
X Title: [ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective · Issue #31406 · matplotlib/matplotlib
Description: Problem Changing the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten by the (converted) main limits at draw time,...
Open Graph Description: Problem Changing the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten by t...
X Description: Problem Changing the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31406
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective","articleBody":"### Problem\n\nChanging the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten by the (converted) main limits at draw time, in SecondaryAxes._set_lims). This should at least warn or raise.\nAlternatively, secondary axes could set {x,y}lim_changed callbacks in both directions to fully keep limits in sync.\n\n### Proposed solution\n\nWarn or raise on ineffective limits updates, or use callbacks to fully keep limits in sync.","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2026-03-27T09:54:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/31406/matplotlib/issues/31406"}
| 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:fb5fe411-b359-08a6-663b-5e4d01cbb7d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF7A:284C6C:3A3F4:4B3B9:6A52535E |
| html-safe-nonce | 54d0658040d29570faf8eefddc645a16d25ee907d9cff12334ca185dd8634b3f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjdBOjI4NEM2QzozQTNGNDo0QjNCOTo2QTUyNTM1RSIsInZpc2l0b3JfaWQiOiI2Njk3OTgxNzE2MTUwNTY3MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 91f91cb52b3326abad774d0f44bc3cccbc247483eeb7cf07ba1cf88e2f894084 |
| hovercard-subject-tag | issue:4151146963 |
| 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/31406/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c8218f347f379fa73628dd567c91f87ebeffafd490ceb7a2585507ed7ece2467/matplotlib/matplotlib/issues/31406 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c8218f347f379fa73628dd567c91f87ebeffafd490ceb7a2585507ed7ece2467/matplotlib/matplotlib/issues/31406 |
| og:image:alt | Problem Changing the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten by t... |
| 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 | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width