Title: shared twinned subplots: support `ax.twinx(sharey=...)` / `ax.twiny(sharex=...)` · Issue #8392 · matplotlib/matplotlib · GitHub
Open Graph Title: shared twinned subplots: support `ax.twinx(sharey=...)` / `ax.twiny(sharex=...)` · Issue #8392 · matplotlib/matplotlib
X Title: shared twinned subplots: support `ax.twinx(sharey=...)` / `ax.twiny(sharex=...)` · Issue #8392 · matplotlib/matplotlib
Description: After fig, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=True) ax1.plot([1, 2]); ax2.plot([1, 2]) ax1.twinx().plot([2, 1]); ax2.twinx().plot([2, 1]) zooming/panning one of the subplots only affects the other subplot along the x axis, ...
Open Graph Description: After fig, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=True) ax1.plot([1, 2]); ax2.plot([1, 2]) ax1.twinx().plot([2, 1]); ax2.twinx().plot([2, 1]) zooming/panning one of the subplots only affe...
X Description: After fig, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=True) ax1.plot([1, 2]); ax2.plot([1, 2]) ax1.twinx().plot([2, 1]); ax2.twinx().plot([2, 1]) zooming/panning one of the subplots only affe...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8392
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"shared twinned subplots: support `ax.twinx(sharey=...)` / `ax.twiny(sharex=...)`","articleBody":"After\r\n```\r\nfig, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=True)\r\nax1.plot([1, 2]); ax2.plot([1, 2])\r\nax1.twinx().plot([2, 1]); ax2.twinx().plot([2, 1])\r\n```\r\nzooming/panning one of the subplots only affects the other subplot along the x axis, but not the y axis -- because zooming/panning affects the twinned subplots, which only share their x axis, whereas the y sharing is lost (of course, it cannot always be shared with the original subplots -- the sharing needs to occur directly between the twinned subplots).\r\n\r\nHaving thought approximately 30s about the issue, I believe an easy way out would be to support passing an explicit `share{y,x}` argument to `twin{x,y}` (for the \"other\" axis, as the twinned axis is already shared with the original subplot, of course), so that one can properly re-link the twinned subplots between themselves.","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2017-03-28T01:47:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/8392/matplotlib/issues/8392"}
| 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:cb169aee-48d3-3697-614c-af8c40f853ff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D468:14A013:BE7488:FD58B5:6A532195 |
| html-safe-nonce | c9935f3bf292e92abaaab19aa65228b726dc8ac0876b01942bf88d2090800e0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDY4OjE0QTAxMzpCRTc0ODg6RkQ1OEI1OjZBNTMyMTk1IiwidmlzaXRvcl9pZCI6IjcxMjM5MDI2NzYxNDkxNTAxMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d9b9e9b66453a6c1c9ac693572c29003882dd2b3199f69709cf97e2387e04e3f |
| hovercard-subject-tag | issue:217424265 |
| 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/8392/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4efa47c0cbbc98ab3a2cfa994fdc66751e130fb4f1f98b69535fced79add74d1/matplotlib/matplotlib/issues/8392 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4efa47c0cbbc98ab3a2cfa994fdc66751e130fb4f1f98b69535fced79add74d1/matplotlib/matplotlib/issues/8392 |
| og:image:alt | After fig, (ax1, ax2) = plt.subplots(2, sharex=True, sharey=True) ax1.plot([1, 2]); ax2.plot([1, 2]) ax1.twinx().plot([2, 1]); ax2.twinx().plot([2, 1]) zooming/panning one of the subplots only affe... |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width