{"action":"created","issue":{"url":"https://api.github.com/repos/plotly/plotly.py/issues/499","repository_url":"https://api.github.com/repos/plotly/plotly.py","labels_url":"https://api.github.com/repos/plotly/plotly.py/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/plotly/plotly.py/issues/499/comments","events_url":"https://api.github.com/repos/plotly/plotly.py/issues/499/events","html_url":"https://github.com/plotly/plotly.py/pull/499","id":159219477,"number":499,"title":"using matpltlib colormaps to create surface colors","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-06-08T17:00:22Z","updated_at":"2016-06-24T17:58:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/plotly/plotly.py/pulls/499","html_url":"https://github.com/plotly/plotly.py/pull/499","diff_url":"https://github.com/plotly/plotly.py/pull/499.diff","patch_url":"https://github.com/plotly/plotly.py/pull/499.patch"},"body":"This is a quick extension of #493. There was a lot of talk about the best way to interpolate between multiple colors in a readable, quick way. This PR mostly does 2 things:\r\n\r\n1. Replaces the custom interpolation code with a matplotlib `LinearSegmentedColormap`. This is a way of creating a custom cmap from a list of rgb colors. Then you can pass it any value between 0 and 1 and it'll return the RGB value. Should have the exact same functionality, is vectorized, and means that some extra code can be removed.\r\n2. Re-introduces vectorization to the facecolor creation. New speed is down to ~1.8 seconds from ~3.6 seconds. Not a gigantic increase but is helpful if you're re-plotting trisurfs many many times.\r\n\r\nOnly drawback I can see is that it introduces another dependency on matplotlib, but it seems like this is already depended on elsewhere, and besides it's likely that the majority of python plotly users will have this installed. LMKWYT."},"comment":{"url":"https://api.github.com/repos/plotly/plotly.py/issues/comments/228416111","html_url":"https://github.com/plotly/plotly.py/pull/499#issuecomment-228416111","issue_url":"https://api.github.com/repos/plotly/plotly.py/issues/499","id":228416111,"user":{"login":"theengineear","id":6611546,"avatar_url":"https://avatars.githubusercontent.com/u/6611546?v=3","gravatar_id":"","url":"https://api.github.com/users/theengineear","html_url":"https://github.com/theengineear","followers_url":"https://api.github.com/users/theengineear/followers","following_url":"https://api.github.com/users/theengineear/following{/other_user}","gists_url":"https://api.github.com/users/theengineear/gists{/gist_id}","starred_url":"https://api.github.com/users/theengineear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theengineear/subscriptions","organizations_url":"https://api.github.com/users/theengineear/orgs","repos_url":"https://api.github.com/users/theengineear/repos","events_url":"https://api.github.com/users/theengineear/events{/privacy}","received_events_url":"https://api.github.com/users/theengineear/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T17:58:32Z","updated_at":"2016-06-24T17:58:32Z","body":"@choldgraf looks useful to me! @Kully do you think we could integrate this? Might be nice to have a `colors.py` file at this point and move all our color-related functionality (and constants) out of `tools.py`."}}
{"actor":{"display_login":"theengineear"}}