Title: RGBA values produce different result for imshow and for markers · Issue #7201 · matplotlib/matplotlib · GitHub
Open Graph Title: RGBA values produce different result for imshow and for markers · Issue #7201 · matplotlib/matplotlib
X Title: RGBA values produce different result for imshow and for markers · Issue #7201 · matplotlib/matplotlib
Description: In the following example, I produce 9 colors ranging from completely transparent red to completely opaque red. In the case of imshow, the lighter colors actually end up being closer to gray, whereas for the scatter markers, the colors lo...
Open Graph Description: In the following example, I produce 9 colors ranging from completely transparent red to completely opaque red. In the case of imshow, the lighter colors actually end up being closer to gray, wherea...
X Description: In the following example, I produce 9 colors ranging from completely transparent red to completely opaque red. In the case of imshow, the lighter colors actually end up being closer to gray, wherea...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7201
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RGBA values produce different result for imshow and for markers","articleBody":"In the following example, I produce 9 colors ranging from completely transparent red to completely opaque red. In the case of imshow, the lighter colors actually end up being closer to gray, whereas for the scatter markers, the colors look as one would expect. What could be causing this?\n\n``` python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndata = np.arange(9, dtype=float).reshape((3, 3)) / 8.\n\ncolor = np.array([1, 0, 0, 1], dtype=float)\n\narray = color * np.ones(data.shape + (4,))\narray[:, :, 3] *= data\n\nfig = plt.figure()\nax = fig.add_subplot(1, 1, 1)\nax.imshow(array, vmin=0, vmax=1, interpolation='nearest')\nfor i in range(3):\n for j in range(3):\n ax.scatter(i, j, s=500, facecolor='white', edgecolor='white', alpha=1.0)\n ax.scatter(i, j, s=400, facecolor=array[j, i], edgecolor='white')\nfig.savefig('colors.png')\n```\n\n\n","author":{"url":"https://github.com/astrofrog","@type":"Person","name":"astrofrog"},"datePublished":"2016-09-29T16:51:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/7201/matplotlib/issues/7201"}
| 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:3a150dc6-6296-89ff-5e5e-917708ff4fc0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D9A:232DB3:D0208:117997:6A525950 |
| html-safe-nonce | 552c164cb52dd1c4bac5b7754002087a1eba8205976c02152768f41216eec1ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDlBOjIzMkRCMzpEMDIwODoxMTc5OTc6NkE1MjU5NTAiLCJ2aXNpdG9yX2lkIjoiNTc3MDY1MDMzNzY0NTA1ODM4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 65b09b37319fb4d7f280385589af5b5c7a13fc6fcaf99770c5f4c1771d1d70ea |
| hovercard-subject-tag | issue:180104130 |
| 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/7201/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e5d6be6f57814e3493ff70996893746d891f8675d359524373f54c77d6eb24a/matplotlib/matplotlib/issues/7201 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e5d6be6f57814e3493ff70996893746d891f8675d359524373f54c77d6eb24a/matplotlib/matplotlib/issues/7201 |
| og:image:alt | In the following example, I produce 9 colors ranging from completely transparent red to completely opaque red. In the case of imshow, the lighter colors actually end up being closer to gray, wherea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | astrofrog |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width