Title: zooming problem on figures with shared axes · Issue #2790 · matplotlib/matplotlib · GitHub
Open Graph Title: zooming problem on figures with shared axes · Issue #2790 · matplotlib/matplotlib
X Title: zooming problem on figures with shared axes · Issue #2790 · matplotlib/matplotlib
Description: Hi! I am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows. If I do: import pylab as p a0 = p.subplot(121) p.imshow(p.rand(100,100)) a1 = p.subplot(122,sharex=a0,sharey=a0) p....
Open Graph Description: Hi! I am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows. If I do: import pylab as p a0 = p.subplot(121) p.imshow(p.rand(100,100)) a1...
X Description: Hi! I am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows. If I do: import pylab as p a0 = p.subplot(121) p.imshow(p.rand(100,100)) a1...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/2790
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zooming problem on figures with shared axes","articleBody":"Hi!\n\nI am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows.\nIf I do:\n\n```\nimport pylab as p\na0 = p.subplot(121) \np.imshow(p.rand(100,100))\na1 = p.subplot(122,sharex=a0,sharey=a0)\np.imshow(p.rand(100,100)**2)\np.figure()\na2 = p.subplot(121,sharex=a0,sharey=a0)\np.imshow(p.rand(100,100)**3)\n```\n\nzooming into one of the axes does as expected: the other two follow.\nHowever, when I resize one of the windows, all three axes zoom out completely (and not in one jump, it looks like seeing the image would be slowly falling away...)\n\nInterestingly if I close the figures my shell still keeps on doing stuff backstage: my cpu is 100% busy. I tried this both under Ipython and a normal python shell.\nUnder Ipython a ctrl-C leads to the following traceback.\n\n```\nOriginal exception was:\nTraceback (most recent call last):\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk.py\", line 435, in expose_event\n self._render_figure(self._pixmap, w, h)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtkagg.py\", line 84, in _render_figure\n FigureCanvasAgg.draw(self)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_agg.py\", line 451, in draw\n self.figure.draw(self.renderer)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py\", line 55, in draw_wrapper\n draw(artist, renderer, *args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/figure.py\", line 1034, in draw\n func(*args)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py\", line 55, in draw_wrapper\n draw(artist, renderer, *args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axes.py\", line 2086, in draw\n a.draw(renderer)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py\", line 55, in draw_wrapper\n draw(artist, renderer, *args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py\", line 1093, in draw\n renderer)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py\", line 1042, in _get_tick_bboxes\n extent = tick.label1.get_window_extent(renderer)\n File \"/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/text.py\", line 757, in get_window_extent\n bbox = bbox.translated(x, y)\n```\n\nthanks in advance!\nJF\n","author":{"url":"https://github.com/jfmoulin","@type":"Person","name":"jfmoulin"},"datePublished":"2014-02-05T09:06:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/2790/matplotlib/issues/2790"}
| 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:1d2e6217-0506-0707-1e3a-f9934c02f32b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2C8:185C34:60D8BA:82CA58:6A52FE7E |
| html-safe-nonce | 10b4d5411b12a9b8ff78b5f5d97e09fb78e6111707fafa45c93df4f9573e0b56 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkM4OjE4NUMzNDo2MEQ4QkE6ODJDQTU4OjZBNTJGRTdFIiwidmlzaXRvcl9pZCI6IjQwMDg4MzcxMDkxMDAyNDg3MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f13b473adb544c7629b84c34c4958df2abd1ce56c2e9a2c335f27c671f3e914 |
| hovercard-subject-tag | issue:26945524 |
| 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/2790/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25eb6e31a617dd5f2b50f47d0b5d9a14d3ccb141b50c4eb76933a9dbec5c6525/matplotlib/matplotlib/issues/2790 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25eb6e31a617dd5f2b50f47d0b5d9a14d3ccb141b50c4eb76933a9dbec5c6525/matplotlib/matplotlib/issues/2790 |
| og:image:alt | Hi! I am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows. If I do: import pylab as p a0 = p.subplot(121) p.imshow(p.rand(100,100)) a1... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jfmoulin |
| 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