René's URL Explorer Experiment


Title: [Bug]: twin axes ignore the navigation opt-outs · Issue #32528 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: twin axes ignore the navigation opt-outs · Issue #32528 · matplotlib/matplotlib

X Title: [Bug]: twin axes ignore the navigation opt-outs · Issue #32528 · matplotlib/matplotlib

Description: Bug summary set_navigate(False) on a twinx() axes, and set_forward_navigation_events(False) on its partner, are both ignored: the toolbar adds twinned siblings to the navigation set unconditionally, so a zoom rectangle moves both y scale...

Open Graph Description: Bug summary set_navigate(False) on a twinx() axes, and set_forward_navigation_events(False) on its partner, are both ignored: the toolbar adds twinned siblings to the navigation set unconditionally...

X Description: Bug summary set_navigate(False) on a twinx() axes, and set_forward_navigation_events(False) on its partner, are both ignored: the toolbar adds twinned siblings to the navigation set unconditionally...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/32528

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: twin axes ignore the navigation opt-outs","articleBody":"### Bug summary\n\nset_navigate(False) on a twinx() axes, and set_forward_navigation_events(False) on its partner, are both ignored: the toolbar adds twinned siblings to the navigation set unconditionally, so a zoom rectangle moves both y scales.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nt = np.linspace(0.0, 10.0, 600)\ny = np.linspace(0.0, 1.0, 200)\nz = np.exp(-(y[:, None] - 0.5 - 0.3 * np.sin(t)) ** 2 / (2 * 0.04 ** 2))   # any image will do\n\nfig, ax = plt.subplots()\nax2 = ax.twinx()\nax2.imshow(z, extent=[t[0], t[-1], 0.0, 1.0], aspect=\"auto\")   # its own y, on [0, 1]\nax2.patch.set_visible(False)                                  # the standard overlay recipe\nax.set_zorder(ax2.get_zorder() + 1)\nax.patch.set_visible(False)\nax.plot(t, np.exp(-t / 6.0) - np.exp(-t), color=\"C0\")   # a pulse for the second image\n\nax2.set_navigate(False)             # both opt-outs, as explicitly as the API allows\nax.set_forward_navigation_events(False)\nplt.show()\n```\n\n### Actual outcome\n\nWith the zoom tool selected, drag a rectangle over the middle of the axes. Both images zoom.\n\n### Expected outcome\n\nOnly the image with the focus should be navigated, not the twin.\n\n### Additional information\n\nIn `NavigationToolbar2._start_event_axes_interaction` (`lib/matplotlib/backend_bases.py`) the\nsiblings are appended before the capture test and without consulting `get_navigate()`:\n\n```python\naxes_to_trigger.append(ax)\n# NOTE: shared axes are automatically triggered, but twin-axes not!\naxes_to_trigger.extend(ax._twinned_axes.get_siblings(ax))\n\nif _capture_events(ax):\n    break\n```\n\nSo neither opt-out applies. This looks like the remaining gap in the feature added for #1502\n(\"twin axis panning / zooming should be toggleable\", closed as fixed by #27148 for 3.9.0):\nthe toggle exists and works between overlapping axes, but not for a twin.\n\nA conservative fix would filter the siblings through the same predicate already applied to the\naxes themselves, so a twin that declines navigation is simply not added and existing behaviour\nis unchanged for everyone else.\n\nThe visible symptom, in an overlay where the back axes holds a fixed image and the front axes a curve, is that dragging a rectangle over the shared position stretches the image vertically while the curve's y stays put. In the live instance, y zooming on the front image was disabled, and that happened correctly, but the fixed background image continued to zoom the y axis in an undesirable way.\n\nOn existing reports: #1502 (\"twin axis panning / zooming should be toggleable\") is the feature request this belongs to and is closed as fixed by #27148 for 3.9.0; I am not reopening it because its request has been met; the toggle exists, and what fails is that it does not reach twins. #9616 (\"second y-axis does not scale correctly when using the zoom tool\") was closed pointing at secondary_yaxis, so I expect the same suggestion here, and it is worth saying in advance why it does not fit: secondary_yaxis derives the second scale from the first by a pair of functions, so it suits a conversion (Fahrenheit/Celsius) but cannot host an independent overlay—in my case the back axes holds data in different units, but neither should be scaled on the yaxis.\n\nDisclosure: the first draft of this report, and the reproduction above, were written by an AI agent working in Open Math OS from my observations; I have run the reproduction myself, understood the issues, and edited as appropriate.\n\nThe full application for context is here: https://github.com/dpthurst/core-entropy-app\n(The standalone app, not the web version using Plotly.)\n\n### Operating system\n\nDebian\n\n### Matplotlib Version\n\n3.10.1+dfsg1\n\n### Matplotlib Backend\n\nqtagg\n\n### Python version\n\nPython 3.13.5\n\n### Jupyter version\n\nN/A\n\n### Installation\n\nLinux package manager","author":{"url":"https://github.com/dpthurst","@type":"Person","name":"dpthurst"},"datePublished":"2026-10-23T02:14:27Z","url":"https://github.com/matplotlib/matplotlib/issues/32528"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f635c520-9b4c-ac2d-d389-708fe174454f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEAC6:29E85A:9A01E1:CF0457:6B064EE4
html-safe-nonce6a3fc90ef6faac5a0cfac128eaffcbd6a6bdb93974a9ac3c97382cadedccaadd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUM2OjI5RTg1QTo5QTAxRTE6Q0YwNDU3OjZCMDY0RUU0IiwidmlzaXRvcl9pZCI6IjU0NzIwNTc1MTg2NjAxOTU1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfc3f4ab916842b4b37c1e585d5076879a51d62113365bce1fc5231b544242a89
hovercard-subject-tagissue:5990664030
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/32528/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9a2be7527c673b20cb473f3608b9d4964969566d1cf973218e19ae8c745c2366/matplotlib/matplotlib/issues/32528
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9a2be7527c673b20cb473f3608b9d4964969566d1cf973218e19ae8c745c2366/matplotlib/matplotlib/issues/32528
og:image:altBug summary set_navigate(False) on a twinx() axes, and set_forward_navigation_events(False) on its partner, are both ignored: the toolbar adds twinned siblings to the navigation set unconditionally...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedpthurst
hostnamegithub.com
expected-hostnamegithub.com
None772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef1f9a08f7c769a37f1dfc18ad43d463c222a7eea
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/32528#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F32528
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F32528
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/32528
Reloadhttps://github.com/matplotlib/matplotlib/issues/32528
Reloadhttps://github.com/matplotlib/matplotlib/issues/32528
matplotlibhttps://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Codehttps://github.com/matplotlib/matplotlib
Issues1k (1k)https://github.com/matplotlib/matplotlib/issues
Pull requests430 (430)https://github.com/matplotlib/matplotlib/pulls
Actionshttps://github.com/matplotlib/matplotlib/actions
Projectshttps://github.com/matplotlib/matplotlib/projects
Wikihttps://github.com/matplotlib/matplotlib/wiki
Security and qualityhttps://github.com/matplotlib/matplotlib/security
Insightshttps://github.com/matplotlib/matplotlib/insights
https://github.com/matplotlib/matplotlib
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32528
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32528
#32544https://github.com/matplotlib/matplotlib/pull/32544
[Bug]: twin axes ignore the navigation opt-outshttps://github.com/matplotlib/matplotlib/issues/32528#top
#32544https://github.com/matplotlib/matplotlib/pull/32544
topic: toolbarhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20toolbar%22
https://github.com/dpthurst
dpthursthttps://github.com/dpthurst
on Oct 23, 2026https://github.com/matplotlib/matplotlib/issues/32528#issue-5990664030
#1502https://github.com/matplotlib/matplotlib/issues/1502
#27148https://github.com/matplotlib/matplotlib/pull/27148
#1502https://github.com/matplotlib/matplotlib/issues/1502
#27148https://github.com/matplotlib/matplotlib/pull/27148
#9616https://github.com/matplotlib/matplotlib/issues/9616
https://github.com/dpthurst/core-entropy-apphttps://github.com/dpthurst/core-entropy-app
iccirhttps://github.com/iccir
topic: toolbarhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20toolbar%22
on Oct 23, 2026https://github.com/matplotlib/matplotlib/issues/32528#event-34013239255
https://github.com/NaumanRafay
NaumanRafayhttps://github.com/NaumanRafay
on Oct 24, 2026https://github.com/matplotlib/matplotlib/issues/32528#issuecomment-6383889479
https://github.com/lucaznch
lucaznchhttps://github.com/lucaznch
on Oct 26, 2026https://github.com/matplotlib/matplotlib/issues/32528#issuecomment-6417536154
@NaumanRafayhttps://github.com/NaumanRafay
contributor's guidehttps://matplotlib.org/devdocs/devel/index.html
AI policyhttps://matplotlib.org/devdocs/devel/contribute.html#generative-ai
Sign up for freehttps://github.com/signup?return_to=https://github.com/matplotlib/matplotlib/issues/32528
Sign in to commenthttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32528
topic: toolbarhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20toolbar%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.