{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4354","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4354/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4354/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4354/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4354","id":69415355,"number":4354,"title":"scatter not showing valid x/y points with invalid color","user":{"login":"megies","id":1842780,"avatar_url":"https://avatars.githubusercontent.com/u/1842780?v=3","gravatar_id":"","url":"https://api.github.com/users/megies","html_url":"https://github.com/megies","followers_url":"https://api.github.com/users/megies/followers","following_url":"https://api.github.com/users/megies/following{/other_user}","gists_url":"https://api.github.com/users/megies/gists{/gist_id}","starred_url":"https://api.github.com/users/megies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megies/subscriptions","organizations_url":"https://api.github.com/users/megies/orgs","repos_url":"https://api.github.com/users/megies/repos","events_url":"https://api.github.com/users/megies/events{/privacy}","received_events_url":"https://api.github.com/users/megies/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/wishlist","name":"wishlist","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18","html_url":"https://github.com/matplotlib/matplotlib/milestones/next%20point%20release","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18/labels","id":970105,"number":18,"title":"next point release","description":"Next minor release.","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":179,"closed_issues":118,"state":"open","created_at":"2015-02-07T21:22:30Z","updated_at":"2015-04-19T19:49:56Z","due_on":"2015-07-06T04:00:00Z","closed_at":null},"comments":3,"created_at":"2015-04-19T11:28:39Z","updated_at":"2015-04-19T19:58:40Z","closed_at":null,"body":"`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.\r\n\r\nConsider this example:\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.cm import spring\r\nimport numpy as np\r\n\r\nspring.set_bad(\"k\", 1)\r\n\r\ncolors = np.array([1, 3, 9, np.nan])\r\nx = [0, 1, 2, 3]\r\n\r\nplt.figure()\r\nplt.imshow(colors.reshape((2, 2)), interpolation=\"nearest\", cmap=spring)\r\n\r\nplt.figure()\r\nplt.scatter(x, x, s=1e4, c=colors, cmap=spring)\r\nplt.show()\r\n```\r\n\r\nThe right-hand side `scatter` plot is not showing the `x=3`, `y=3`, `color=np.nan` data point:\r\n\r\n![figure_1](https://cloud.githubusercontent.com/assets/1842780/7219252/88a221ea-e697-11e4-8862-421f6d1115ee.png)\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/94309137","html_url":"https://github.com/matplotlib/matplotlib/issues/4354#issuecomment-94309137","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4354","id":94309137,"user":{"login":"efiring","id":85125,"avatar_url":"https://avatars.githubusercontent.com/u/85125?v=3","gravatar_id":"","url":"https://api.github.com/users/efiring","html_url":"https://github.com/efiring","followers_url":"https://api.github.com/users/efiring/followers","following_url":"https://api.github.com/users/efiring/following{/other_user}","gists_url":"https://api.github.com/users/efiring/gists{/gist_id}","starred_url":"https://api.github.com/users/efiring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efiring/subscriptions","organizations_url":"https://api.github.com/users/efiring/orgs","repos_url":"https://api.github.com/users/efiring/repos","events_url":"https://api.github.com/users/efiring/events{/privacy}","received_events_url":"https://api.github.com/users/efiring/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T19:58:40Z","updated_at":"2015-04-19T19:58:40Z","body":"I think the OP is reporting a bug, or API inconsistency, that has always been present and is easily fixed.  I will try that now."}}