Title: pcolorimage/pcolorfast silently drops alpha · Issue #13328 · matplotlib/matplotlib · GitHub
Open Graph Title: pcolorimage/pcolorfast silently drops alpha · Issue #13328 · matplotlib/matplotlib
X Title: pcolorimage/pcolorfast silently drops alpha · Issue #13328 · matplotlib/matplotlib
Description: Bug report Bug summary When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to handle that in the definition of pcolorfast:...
Open Graph Description: Bug report Bug summary When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to hand...
X Description: Bug report Bug summary When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to hand...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/13328
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pcolorimage/pcolorfast silently drops alpha","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\nWhen pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to handle that in the definition of pcolorfast:\r\n```python\r\n elif style == \"pcolorimage\":\r\n im = mimage.PcolorImage(self, x, y, C,\r\n cmap=cmap,\r\n norm=norm,\r\n alpha=alpha, # \u003c- here\r\n **kwargs)\r\n```\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nplt.gca().pcolorfast(\r\n [4, 8, 10], [7, 8, 10, 11], np.array([[0, 1], [2, 3], [4, 5]]),\r\n alpha=.5, cmap=\"viridis\")\r\n```\r\n\r\n**Actual outcome**\r\n\r\nThe alpha channel is not applied. Compare e.g. with\r\n```python\r\nplt.gca().pcolorfast(\r\n (0, 1), (2, 3), np.array([[0, 1], [2, 3], [4, 5]]),\r\n alpha=.5, cmap=\"viridis\")\r\n```\r\nwhich uses AxesImage and correctly applies alpha.\r\n\r\n**Expected outcome**\r\n\r\nper above\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: linux\r\n * Matplotlib version: 3.0 and master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): qt5agg\r\n * Python version: 3.7\r\n * Jupyter version (if applicable): n/a\r\n * Other libraries: n/a\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2019-01-30T16:35:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/13328/matplotlib/issues/13328"}
| 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:e28a4935-161e-9af0-8cb0-a3e33a8fd2c8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83C4:25EC2E:2E0DA75:3E0EBCD:6A53BE96 |
| html-safe-nonce | 90c6e78b31c7502f224980a69209d13dc1be9db8ad4d9bb57072aad61a995d2d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0M0OjI1RUMyRToyRTBEQTc1OjNFMEVCQ0Q6NkE1M0JFOTYiLCJ2aXNpdG9yX2lkIjoiNDEwOTcyODkwNTk1MDM3OTY3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49a4c0cc413d5b9a7e96ac1e89017a15f11c181bcd6aefdca534760447f831aa |
| hovercard-subject-tag | issue:404857121 |
| 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/13328/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a441b8275f0e479bf6ced1ef048726a178b0c7f7b5f26e7025c2bac7a15f2d97/matplotlib/matplotlib/issues/13328 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a441b8275f0e479bf6ced1ef048726a178b0c7f7b5f26e7025c2bac7a15f2d97/matplotlib/matplotlib/issues/13328 |
| og:image:alt | Bug report Bug summary When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to hand... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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