Title: [Bug]: image alpha re-applied each draw? · Issue #29891 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: image alpha re-applied each draw? · Issue #29891 · matplotlib/matplotlib
X Title: [Bug]: image alpha re-applied each draw? · Issue #29891 · matplotlib/matplotlib
Description: Bug summary On main, if I plot an RGBA image and then mess about with the gui window size, the image keeps getting darker. Code for reproduction import matplotlib.pyplot as plt import numpy as np np.random.seed(42) rgba = np.random.rando...
Open Graph Description: Bug summary On main, if I plot an RGBA image and then mess about with the gui window size, the image keeps getting darker. Code for reproduction import matplotlib.pyplot as plt import numpy as np n...
X Description: Bug summary On main, if I plot an RGBA image and then mess about with the gui window size, the image keeps getting darker. Code for reproduction import matplotlib.pyplot as plt import numpy as np n...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29891
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: image alpha re-applied each draw?","articleBody":"### Bug summary\n\nOn `main`, if I plot an RGBA image and then mess about with the gui window size, the image keeps getting darker.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nnp.random.seed(42)\nrgba = np.random.random((2, 2, 4))\n\nfig, ax = plt.subplots()\n\nax.imshow(rgba)\n\nplt.show()\n```\n\n### Actual outcome\n\nAfter resizing the window a lot\n\n\n\n### Expected outcome\n\n\n\n### Additional information\n\nBisects to #29776 (cc @anntzer)\n\nThe problem is specific to RGBA - I noticed it first with the code from https://github.com/matplotlib/matplotlib/issues/26092#issuecomment-1683341255, where only the top two plots of the righthand column are affected.\n\n### Operating system\n\nRHEL9\n\n### Matplotlib Version\n\nmain\n\n### Matplotlib Backend\n\nqtagg\n\n### Python version\n\n3.12.7\n\n### Jupyter version\n\nn/a\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/rcomer","@type":"Person","name":"rcomer"},"datePublished":"2025-04-09T17:34:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/29891/matplotlib/issues/29891"}
| 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:7863a9e4-c2b6-47fc-d394-5c93cea8575c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB22:3A486F:6D822:92BA6:6A52DDFD |
| html-safe-nonce | d9c464986e443dfb90e5fadefd33866e3db4fa2cc3f007474a87ffccc9633db0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjIyOjNBNDg2Rjo2RDgyMjo5MkJBNjo2QTUyRERGRCIsInZpc2l0b3JfaWQiOiIzNDMzMzQxMjIxMTk5ODYzMjkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7b66195aa241be240c6461c9862a72414b94f906eba12ed9a3cae1ee2c049ce3 |
| hovercard-subject-tag | issue:2983461925 |
| 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/29891/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16cf5eae5b362196aa4f33d88070eb58c7fead50434a450c5c9e2c41a39e7bd8/matplotlib/matplotlib/issues/29891 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16cf5eae5b362196aa4f33d88070eb58c7fead50434a450c5c9e2c41a39e7bd8/matplotlib/matplotlib/issues/29891 |
| og:image:alt | Bug summary On main, if I plot an RGBA image and then mess about with the gui window size, the image keeps getting darker. Code for reproduction import matplotlib.pyplot as plt import numpy as np n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rcomer |
| 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