{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3973","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3973/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3973/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3973/events","html_url":"https://github.com/matplotlib/matplotlib/pull/3973","id":53594805,"number":3973,"title":"WIP: BUG: Convert qualitative colormaps to ListedColormap","user":{"login":"endolith","id":58611,"avatar_url":"https://avatars.githubusercontent.com/u/58611?v=3","gravatar_id":"","url":"https://api.github.com/users/endolith","html_url":"https://github.com/endolith","followers_url":"https://api.github.com/users/endolith/followers","following_url":"https://api.github.com/users/endolith/following{/other_user}","gists_url":"https://api.github.com/users/endolith/gists{/gist_id}","starred_url":"https://api.github.com/users/endolith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endolith/subscriptions","organizations_url":"https://api.github.com/users/endolith/orgs","repos_url":"https://api.github.com/users/endolith/repos","events_url":"https://api.github.com/users/endolith/events{/privacy}","received_events_url":"https://api.github.com/users/endolith/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/API%20Changes","name":"API Changes","color":"000000"},{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/needs_review","name":"needs_review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/19","html_url":"https://github.com/matplotlib/matplotlib/milestones/Color%20overhaul","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/19/labels","id":982168,"number":19,"title":"Color overhaul","description":"v2.0.0 milestone\r\n\r\nThe v2.0 will be based on the 1.4.3 release and contain only default color changes and bug-fixes.","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":8,"closed_issues":8,"state":"open","created_at":"2015-02-17T00:47:12Z","updated_at":"2015-03-26T13:27:24Z","due_on":"2015-04-30T04:00:00Z","closed_at":null},"comments":6,"created_at":"2015-01-07T03:50:27Z","updated_at":"2015-03-26T14:30:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/3973","html_url":"https://github.com/matplotlib/matplotlib/pull/3973","diff_url":"https://github.com/matplotlib/matplotlib/pull/3973.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/3973.patch"},"body":"\"Qualitative\" colormaps are designed to be used on things like chloropleths, not smoothly-varying heatmaps, in applications such as [scipy.ndimage.measurements.label](http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.measurements.label.html).  It would be nice to have some predefined named maps for this purpose.  ColorBrewer has some (Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3) but they were [mistakenly](https://github.com/matplotlib/matplotlib/issues/881#issuecomment-5799075) created as LinearSegmentedColormap when they should have been ListedColormap, so I converted them.\r\n\r\nI left these colormaps in the same _cm.py file and \"tagged\" them with a dictionary and hacked in a path for them to be implemented as ListedColormap.  This is hacky and I expect you to reject it, but I don't know of a better way right now.  Please suggest a more proper way to implement this, moving them to their own file, etc.\r\n\r\nIn https://github.com/matplotlib/matplotlib/issues/881 there was concern that this would cause backward compatibility problems, but this won't actually \"break\" any existing code that uses them, they can still be used for heatmaps, the images will just become solid colors instead:\r\n\r\n![Paired original](https://cloud.githubusercontent.com/assets/58611/5640574/132047d2-95f5-11e4-85f4-b6df986a8835.png)\r\n![Paired ListedColormap](https://cloud.githubusercontent.com/assets/58611/5640573/131b8c42-95f5-11e4-83e0-c9a524019d04.png)\r\n\r\nThey're pretty ugly when used as heatmaps, so I doubt they are being used this way very often."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/86541207","html_url":"https://github.com/matplotlib/matplotlib/pull/3973#issuecomment-86541207","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3973","id":86541207,"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-03-26T14:30:15Z","updated_at":"2015-03-26T14:30:15Z","body":"Yes, please create a new heading for 2.0\n\nFair enough re text vs npy files.\n\nOn Wed, Mar 18, 2015 at 11:54 PM endolith <notifications@github.com> wrote:\n\n> Could you also add a note in whats_new and api_changes explaining this\n> change?\n>\n> Under a heading of version 2.0?\n>\n> Would it be better to store the color map values in a npy file that we\n> bundle rather than as text\n>\n> I would prefer they stay as text for transparency of where they come from,\n> and ease of editing in situations like this.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/matplotlib/matplotlib/pull/3973#issuecomment-83304346>\n> .\n>\n"}}