{"action":"created","issue":{"url":"https://api.github.com/repos/Napari/napari-gui/issues/89","repository_url":"https://api.github.com/repos/Napari/napari-gui","labels_url":"https://api.github.com/repos/Napari/napari-gui/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/Napari/napari-gui/issues/89/comments","events_url":"https://api.github.com/repos/Napari/napari-gui/issues/89/events","html_url":"https://github.com/Napari/napari-gui/pull/89","id":390695040,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NDAyNTI0","number":89,"title":"Add matplotlib colormaps and set magma as default","user":{"login":"jni","id":492549,"node_id":"MDQ6VXNlcjQ5MjU0OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/492549?v=4","gravatar_id":"","url":"https://api.github.com/users/jni","html_url":"https://github.com/jni","followers_url":"https://api.github.com/users/jni/followers","following_url":"https://api.github.com/users/jni/following{/other_user}","gists_url":"https://api.github.com/users/jni/gists{/gist_id}","starred_url":"https://api.github.com/users/jni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jni/subscriptions","organizations_url":"https://api.github.com/users/jni/orgs","repos_url":"https://api.github.com/users/jni/repos","events_url":"https://api.github.com/users/jni/events{/privacy}","received_events_url":"https://api.github.com/users/jni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-13T14:08:55Z","updated_at":"2018-12-14T23:38:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Napari/napari-gui/pulls/89","html_url":"https://github.com/Napari/napari-gui/pull/89","diff_url":"https://github.com/Napari/napari-gui/pull/89.diff","patch_url":"https://github.com/Napari/napari-gui/pull/89.patch"},"body":"# Description\r\nThis PR adds support for all the matplotlib colormaps and sets magma as the default for grayscale image layers.\r\n\r\nI also tried `viewer.layers[0].cmap = 'inferno'` and it instantly updated! Maybe everyone else reading this is already used to the magic of Napari but I'm still in the amazed phase. =D\r\n\r\nI'll also note that `python examples/layers.py` results in\r\n\r\n```pytb\r\n $ python examples/layers.py \r\n/home/jni/miniconda3/envs/cf/lib/python3.6/site-packages/vispy/visuals/isocurve.py:22: UserWarning: VisPy is not yet compatible with matplotlib 2.2+\r\n  warnings.warn(\"VisPy is not yet compatible with matplotlib 2.2+\")\r\nTraceback (most recent call last):\r\n  File \"examples/layers.py\", line 84, in <module>\r\n    viewer.show()\r\nAttributeError: 'Viewer' object has no attribute 'show'\r\n```\r\n\r\nbut I consider fixing that beyond the scope of this PR.\r\n## Type of change\r\n<!-- Please delete options that are not relevant. -->\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] This change requires a documentation update (@jni says: ?)\r\n\r\n# How has this been tested?\r\nI ran `demo.py` without issue and `layers.ipynb` which verified that the default colormap and another colormap from matplotlib both worked.\r\n\r\n## Final checklist:\r\n- [x] My PR is the minimum possible work for the desired functionality  :arrow_left: this is definitely true :stuck_out_tongue: \r\n- [x] I have commented my code, particularly in hard-to-understand areas\r\n- [ ] I have made corresponding changes to the documentation (?)\r\n- [ ] I have added tests that prove my fix is effective or that my feature works (?)\r\n"},"comment":{"url":"https://api.github.com/repos/Napari/napari-gui/issues/comments/447510709","html_url":"https://github.com/Napari/napari-gui/pull/89#issuecomment-447510709","issue_url":"https://api.github.com/repos/Napari/napari-gui/issues/89","id":447510709,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzUxMDcwOQ==","user":{"login":"kne42","id":29165011,"node_id":"MDQ6VXNlcjI5MTY1MDEx","avatar_url":"https://avatars3.githubusercontent.com/u/29165011?v=4","gravatar_id":"","url":"https://api.github.com/users/kne42","html_url":"https://github.com/kne42","followers_url":"https://api.github.com/users/kne42/followers","following_url":"https://api.github.com/users/kne42/following{/other_user}","gists_url":"https://api.github.com/users/kne42/gists{/gist_id}","starred_url":"https://api.github.com/users/kne42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kne42/subscriptions","organizations_url":"https://api.github.com/users/kne42/orgs","repos_url":"https://api.github.com/users/kne42/repos","events_url":"https://api.github.com/users/kne42/events{/privacy}","received_events_url":"https://api.github.com/users/kne42/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T23:38:11Z","updated_at":"2018-12-14T23:38:11Z","author_association":"CONTRIBUTOR","body":"Agree with @freeman-lab and @royerloic. Also not sure what you’re bringing up about the error – we have no `layers.py` example."}}
{"actor":{"display_login":"kne42"}}