{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4417","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4417/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4417/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4417/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4417","id":74414024,"number":4417,"title":"incorrect color assigned by scatter plot when plotting points of a single c value","user":{"login":"eyurtsev","id":3205522,"avatar_url":"https://avatars.githubusercontent.com/u/3205522?v=3","gravatar_id":"","url":"https://api.github.com/users/eyurtsev","html_url":"https://github.com/eyurtsev","followers_url":"https://api.github.com/users/eyurtsev/followers","following_url":"https://api.github.com/users/eyurtsev/following{/other_user}","gists_url":"https://api.github.com/users/eyurtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/eyurtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyurtsev/subscriptions","organizations_url":"https://api.github.com/users/eyurtsev/orgs","repos_url":"https://api.github.com/users/eyurtsev/repos","events_url":"https://api.github.com/users/eyurtsev/events{/privacy}","received_events_url":"https://api.github.com/users/eyurtsev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-08T16:14:51Z","updated_at":"2015-05-11T02:12:45Z","closed_at":"2015-05-11T02:12:45Z","body":"In the second subplot, the point should be red (c=1.0). But a blue point is plotted instead. This happens whenever len(set(c)) = 1.\r\n\r\nmatplotlib 1.4.2\r\n\r\nI saw there were a couple of recent fixes to the scatter plot functionality, so this may have been already addressed. (I apologize if that's the case.)\r\n\r\n```\r\n%pylab inline\r\n\r\nsubplot(3, 1, 1)\r\nscatter([0.0], [0.0], c=[0.0], cmap=cm.coolwarm)\r\nxlim(-1, 2)\r\nylim(-1, 1)\r\n\r\nsubplot(3, 1, 2)\r\nscatter([1.0], [0.0], c=[1.0], cmap=cm.coolwarm)\r\nxlim(-1, 2)\r\nylim(-1, 1)\r\n\r\nsubplot(3, 1, 3)\r\nscatter([0.0, 1.0], [0.0, 0.0], c=[0.0, 1.0], cmap=cm.coolwarm)\r\nxlim(-1, 2)\r\nylim(-1, 1)\r\n\r\ntight_layout()\r\n```\r\n\r\n![download 2](https://cloud.githubusercontent.com/assets/3205522/7540333/59ffceda-f57b-11e4-921d-398b7ead8563.png)\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/100739871","html_url":"https://github.com/matplotlib/matplotlib/issues/4417#issuecomment-100739871","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4417","id":100739871,"user":{"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},"created_at":"2015-05-11T02:12:45Z","updated_at":"2015-05-11T02:12:45Z","body":"Each scatter has it's own norm method and limits, this is the correct behavior.  \r\n\r\nIf you want all of the `scatter` calls to share the same limits either pass the same `Norm` object to all of them via the `norm` kwarg (just be careful to manage it's limits explicitly or they will be set to the min/max of the first data it is plotted with) which will keep all of them in-sync if you change the color limit (modulo bugs in the caching logic) or pass the same kwargs `vmin` and `vmax` to each call."}}