Title: colorbar resizes in animation · Issue #12550 · matplotlib/matplotlib · GitHub
Open Graph Title: colorbar resizes in animation · Issue #12550 · matplotlib/matplotlib
X Title: colorbar resizes in animation · Issue #12550 · matplotlib/matplotlib
Description: Bug report When animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3. import numpy as np import matplotlib.pyplot as plt from sc...
Open Graph Description: Bug report When animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3. import numpy as np...
X Description: Bug report When animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3. import numpy as np...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12550
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"colorbar resizes in animation","articleBody":"### Bug report\r\nWhen animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3.\r\n\r\n```Python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom scipy.ndimage import laplace\r\n\r\n\r\ndef main():\r\n time = np.arange(0, 1, 0.01)\r\n c = np.zeros(shape=(11, 11))\r\n c[5, 5] = 1\r\n\r\n fig = plt.figure()\r\n ax = fig.gca()\r\n im = ax.imshow(c)\r\n fig.colorbar(im)\r\n\r\n for t in time:\r\n c += laplace(c) / 10\r\n im.set_data(c)\r\n im.set_clim(0, np.max(c))\r\n plt.pause(0.001)\r\n plt.show()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\n\r\n**Matplotlib version**\r\n * Operating system: windows 7\r\n * Matplotlib version: 3.0.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): TkAgg\r\n * Python version: 3.7\r\n\r\nPython was installed using the latest Anaconda distribution.","author":{"url":"https://github.com/sakra1","@type":"Person","name":"sakra1"},"datePublished":"2018-10-17T20:23:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/12550/matplotlib/issues/12550"}
| 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:336bbc88-8759-0c12-fe12-ffb2658f5680 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0DE:39252:1185494:17A6AED:6A57160F |
| html-safe-nonce | 64444a54349d21eb5b15ff294d802a060a0ce459d6314f92ab2c79e1d4644c6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMERFOjM5MjUyOjExODU0OTQ6MTdBNkFFRDo2QTU3MTYwRiIsInZpc2l0b3JfaWQiOiIxMjkxNTgxNjk5NDUzODE4MzgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d0b4dc8bfaf72a6eea13473aafae340345536c125d64b2a9eb24288fbb31d382 |
| hovercard-subject-tag | issue:371252012 |
| 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/12550/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a720aa0cc87420cd21062202420fe4e9999d661315475b6d331e1805374b71b3/matplotlib/matplotlib/issues/12550 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a720aa0cc87420cd21062202420fe4e9999d661315475b6d331e1805374b71b3/matplotlib/matplotlib/issues/12550 |
| og:image:alt | Bug report When animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3. import numpy as np... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sakra1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | 2576d1f0198cf1588faf2edf27f1ed120903be10 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width