Title: scatter not showing valid x/y points with invalid color · Issue #4354 · matplotlib/matplotlib · GitHub
Open Graph Title: scatter not showing valid x/y points with invalid color · Issue #4354 · matplotlib/matplotlib
X Title: scatter not showing valid x/y points with invalid color · Issue #4354 · matplotlib/matplotlib
Description: scatter plots are removing points with valid x/y coordinates but invalid color value. As colormaps have a special setting for what color should be used in case of invalid data points (used e.g. in imshow array plots) maybe these points s...
Open Graph Description: scatter plots are removing points with valid x/y coordinates but invalid color value. As colormaps have a special setting for what color should be used in case of invalid data points (used e.g. in ...
X Description: scatter plots are removing points with valid x/y coordinates but invalid color value. As colormaps have a special setting for what color should be used in case of invalid data points (used e.g. in ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4354
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scatter not showing valid x/y points with invalid color","articleBody":"`scatter` plots are removing points with valid x/y coordinates but invalid color value. As colormaps have a special setting for what color should be used in case of invalid data points (used e.g. in `imshow` array plots) maybe these points should indeed be plotted and plotted with the specified \"bad value\" color.\n\nConsider this example:\n\n``` python\nimport matplotlib.pyplot as plt\nfrom matplotlib.cm import spring\nimport numpy as np\n\nspring.set_bad(\"k\", 1)\n\ncolors = np.array([1, 3, 9, np.nan])\nx = [0, 1, 2, 3]\n\nplt.figure()\nplt.imshow(colors.reshape((2, 2)), interpolation=\"nearest\", cmap=spring)\n\nplt.figure()\nplt.scatter(x, x, s=1e4, c=colors, cmap=spring)\nplt.show()\n```\n\nThe right-hand side `scatter` plot is not showing the `x=3`, `y=3`, `color=np.nan` data point:\n\n\n","author":{"url":"https://github.com/megies","@type":"Person","name":"megies"},"datePublished":"2015-04-19T11:28:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/4354/matplotlib/issues/4354"}
| 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:17c601b0-9fe8-e918-10cd-d9957f309cf7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D186:23DB3B:B435B:EF46C:6A52AFEB |
| html-safe-nonce | b19df2e02f7f8399fcf0b2aec63ff6d008d26394e6c180b5026f50cc76ed3eb5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTg2OjIzREIzQjpCNDM1QjpFRjQ2Qzo2QTUyQUZFQiIsInZpc2l0b3JfaWQiOiI5ODkxNjM3OTY0ODc2NDcyMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e774585b5a666a05a42c63e3e41def9cf8bdb1a0ca68b1954d7fd330542ee9ff |
| hovercard-subject-tag | issue:69415355 |
| 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/4354/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a611a2579c412de97e12879c9a0e205f3b933125cc09fe257ca5e71a9e373868/matplotlib/matplotlib/issues/4354 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a611a2579c412de97e12879c9a0e205f3b933125cc09fe257ca5e71a9e373868/matplotlib/matplotlib/issues/4354 |
| og:image:alt | scatter plots are removing points with valid x/y coordinates but invalid color value. As colormaps have a special setting for what color should be used in case of invalid data points (used e.g. in ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | megies |
| 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