Title: colorbar.make_axes doesn't anchor in constrained_layout · Issue #14638 · matplotlib/matplotlib · GitHub
Open Graph Title: colorbar.make_axes doesn't anchor in constrained_layout · Issue #14638 · matplotlib/matplotlib
X Title: colorbar.make_axes doesn't anchor in constrained_layout · Issue #14638 · matplotlib/matplotlib
Description: Bug report Bug summary There doesn't appear a way to move colorbars up and down when using colorbar.make_axes() in constrained_layout=True mode. The anchor argument appears to be functionally ignored. (Note that location specifies left/r...
Open Graph Description: Bug report Bug summary There doesn't appear a way to move colorbars up and down when using colorbar.make_axes() in constrained_layout=True mode. The anchor argument appears to be functionally ignor...
X Description: Bug report Bug summary There doesn't appear a way to move colorbars up and down when using colorbar.make_axes() in constrained_layout=True mode. The anchor argument appears to be functionally i...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14638
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"colorbar.make_axes doesn't anchor in constrained_layout","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nThere doesn't appear a way to move colorbars up and down when using `colorbar.make_axes()` in `constrained_layout=True` mode. The `anchor` argument appears to be functionally ignored. (Note that `location` specifies left/right/top/bottom, whereas `anchor` should move the colorbar within the specified location, eg if the default location of right is chosen, anchor allows moving the colorbar to the top or bottom.)\r\n\r\nThis appears to be an incomplete implementation of the `constrained_layout.layoutcolorbargridspec` function, called from here:\r\n\r\nhttps://github.com/matplotlib/matplotlib/blob/c8b92926a880163394e3bd7f56220b65df71646c/lib/matplotlib/_constrained_layout.py\r\n\r\nPlease let me know if I'm missing something or if there's a workaround.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nfig, ax = plt.subplots(constrained_layout=True)\r\nax.scatter(np.arange(100), np.arange(100), c=np.arange(100))\r\ncax, _ = matplotlib.colorbar.make_axes(ax, shrink=0.5, anchor=(0.0, 1.0))\r\ncbar = matplotlib.colorbar.ColorbarBase(cax)\r\n```\r\n\r\n**Actual outcome**\r\n\r\nWith `constrained_layout=True`:\r\n\r\n\r\n**Expected outcome**\r\n\r\nWith `constrained_layout=True`, the anchor argument is honored:\r\n\r\n\r\n(Note that the colorbar has moved to the top, as expected given the `anchor=(0, 1.0)`.)\r\n\r\n","author":{"url":"https://github.com/nspies-celsiustx","@type":"Person","name":"nspies-celsiustx"},"datePublished":"2019-06-26T19:30:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/14638/matplotlib/issues/14638"}
| 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:cb810bfc-6f28-282d-8bb2-890ac1e278a3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 878C:230914:23769C:3161E7:6A536D60 |
| html-safe-nonce | b477570a8e06b398d7efe7c558bc21048a2c0a436cbb93a77efe06eec4a2cbfc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzhDOjIzMDkxNDoyMzc2OUM6MzE2MUU3OjZBNTM2RDYwIiwidmlzaXRvcl9pZCI6Ijg4NjIzOTMwNzI2MzU1NzE1NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3dcc69d9504b8e8249ce6da46c9340e59a28004ec5802994cf10b89d3e6a8869 |
| hovercard-subject-tag | issue:461143309 |
| 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/14638/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54dbba3a7763ab35b450913aa8c30843920cfcf9c60690036360b535a77a7491/matplotlib/matplotlib/issues/14638 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54dbba3a7763ab35b450913aa8c30843920cfcf9c60690036360b535a77a7491/matplotlib/matplotlib/issues/14638 |
| og:image:alt | Bug report Bug summary There doesn't appear a way to move colorbars up and down when using colorbar.make_axes() in constrained_layout=True mode. The anchor argument appears to be functionally ignor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nspies-celsiustx |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width