Title: constrained_layout and colorbar for a subset of axes · Issue #11641 · matplotlib/matplotlib · GitHub
Open Graph Title: constrained_layout and colorbar for a subset of axes · Issue #11641 · matplotlib/matplotlib
X Title: constrained_layout and colorbar for a subset of axes · Issue #11641 · matplotlib/matplotlib
Description: Bug report Bug summary constrained_layout seems to place colorbars at the "extreme right" of the image. (not sure how to phrase this; see below) Code for reproduction f, ax = plt.subplots(2,2, constrained_layout=True) data = np.random.ra...
Open Graph Description: Bug report Bug summary constrained_layout seems to place colorbars at the "extreme right" of the image. (not sure how to phrase this; see below) Code for reproduction f, ax = plt.subplots(2,2, cons...
X Description: Bug report Bug summary constrained_layout seems to place colorbars at the "extreme right" of the image. (not sure how to phrase this; see below) Code for reproduction f, ax = plt.subplots...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11641
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"constrained_layout and colorbar for a subset of axes","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nconstrained_layout seems to place colorbars at the \"extreme right\" of the image. (not sure how to phrase this; see below)\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\nf, ax = plt.subplots(2,2, constrained_layout=True)\r\n\r\ndata = np.random.randn(10, 10)\r\n \r\nfor aa in ax.flat:\r\n mappable = aa.pcolormesh(data)\r\n \r\nf.colorbar(mappable, ax=ax[:, 0])\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nI would like the constrained_layout version of this --- which results when setting `constrained_layout=False` in the `plt.subplots` call above\r\n\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Ubuntu 16.04\r\n * Matplotlib version: 2.2.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): `module://ipykernel.pylab.backend_inline`\r\n * Python version: 3.6.5\r\n * Jupyter version (if applicable): 5.5.0\r\n * Other libraries: \r\n\r\n\r\n","author":{"url":"https://github.com/dcherian","@type":"Person","name":"dcherian"},"datePublished":"2018-07-12T06:17:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/11641/matplotlib/issues/11641"}
| 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:e32c6969-6aea-4873-4c0e-e4144e6651e0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B86:3FCE56:3FED5B7:5A60CDF:6A56C835 |
| html-safe-nonce | 55bb3ef9a579c8e20657fed97afce0e2e99c5fe8a6783094882ecc6066f704c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qjg2OjNGQ0U1NjozRkVENUI3OjVBNjBDREY6NkE1NkM4MzUiLCJ2aXNpdG9yX2lkIjoiNjI0NTA2NTMwNDEwNTczMjE0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c82e7210c042645aaa457cddf8f6d733d7b5216bc033e07ef6f3d60c8b4cfb80 |
| hovercard-subject-tag | issue:340502588 |
| 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/11641/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16129325f8521af5265369c3433c60aab58eeeeed290497466eea8083fcb2556/matplotlib/matplotlib/issues/11641 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16129325f8521af5265369c3433c60aab58eeeeed290497466eea8083fcb2556/matplotlib/matplotlib/issues/11641 |
| og:image:alt | Bug report Bug summary constrained_layout seems to place colorbars at the "extreme right" of the image. (not sure how to phrase this; see below) Code for reproduction f, ax = plt.subplots(2,2, cons... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dcherian |
| hostname | github.com |
| expected-hostname | github.com |
| None | df99b7164e1d961b639cf5d3cbd6b5ba673edc67bd7e47cdc4746b96099e11ae |
| 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 | 3146ab55fc8763ab0e1d2a875e600b3a545bc751 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width