{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/4982","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/4982/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/4982/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/4982/events","html_url":"https://github.com/bokeh/bokeh/pull/4982","id":171841562,"number":4982,"title":"Transform data with ColorMapper","user":{"login":"birdsarah","id":1796208,"avatar_url":"https://avatars.githubusercontent.com/u/1796208?v=3","gravatar_id":"","url":"https://api.github.com/users/birdsarah","html_url":"https://github.com/birdsarah","followers_url":"https://api.github.com/users/birdsarah/followers","following_url":"https://api.github.com/users/birdsarah/following{/other_user}","gists_url":"https://api.github.com/users/birdsarah/gists{/gist_id}","starred_url":"https://api.github.com/users/birdsarah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdsarah/subscriptions","organizations_url":"https://api.github.com/users/birdsarah/orgs","repos_url":"https://api.github.com/users/birdsarah/repos","events_url":"https://api.github.com/users/birdsarah/events{/privacy}","received_events_url":"https://api.github.com/users/birdsarah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/status:%20superseded","name":"status: superseded","color":"A39494"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-18T08:08:10Z","updated_at":"2016-08-18T09:55:52Z","closed_at":"2016-08-18T09:43:52Z","pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/4982","html_url":"https://github.com/bokeh/bokeh/pull/4982","diff_url":"https://github.com/bokeh/bokeh/pull/4982.diff","patch_url":"https://github.com/bokeh/bokeh/pull/4982.patch"},"body":"- [x] issues: fixes #4981\r\n- [ ] tests added / passed\r\n- [ ] release document entry (if new feature or API change)\r\n\r\n```python\r\nimport numpy as np\r\n\r\nfrom bokeh.io import show\r\nfrom bokeh.models.sources import ColumnDataSource\r\nfrom bokeh.models.mappers import LinearColorMapper, LogColorMapper\r\nfrom bokeh.palettes import Viridis3\r\nfrom bokeh.plotting import figure\r\n\r\nx = np.random.random(2500) * 10\r\ny = np.random.normal(size=2500) * 2 + 5\r\nsource = ColumnDataSource(dict(x=x, y1=y, y2=y - 10))\r\n\r\nlog_mapper = LogColorMapper(palette=Viridis3)\r\nlin_mapper = LinearColorMapper(palette=Viridis3)\r\n\r\np = figure()\r\nopts = dict(x='x', line_color=None, source=source)\r\np.circle(y='y1', fill_color={'field': 'x', 'transform': log_mapper}, legend=\"Log mapper\", **opts)\r\np.triangle(y='y2', fill_color={'field': 'x', 'transform': lin_mapper}, legend=\"Lin mapper\", **opts)\r\n\r\nshow(p)\r\n```\r\n\r\n![bokeh_plot](https://cloud.githubusercontent.com/assets/1796208/17766489/35a46f48-64e0-11e6-8da7-3f0137d899b1.png)\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/240677944","html_url":"https://github.com/bokeh/bokeh/pull/4982#issuecomment-240677944","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/4982","id":240677944,"user":{"login":"birdsarah","id":1796208,"avatar_url":"https://avatars.githubusercontent.com/u/1796208?v=3","gravatar_id":"","url":"https://api.github.com/users/birdsarah","html_url":"https://github.com/birdsarah","followers_url":"https://api.github.com/users/birdsarah/followers","following_url":"https://api.github.com/users/birdsarah/following{/other_user}","gists_url":"https://api.github.com/users/birdsarah/gists{/gist_id}","starred_url":"https://api.github.com/users/birdsarah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdsarah/subscriptions","organizations_url":"https://api.github.com/users/birdsarah/orgs","repos_url":"https://api.github.com/users/birdsarah/repos","events_url":"https://api.github.com/users/birdsarah/events{/privacy}","received_events_url":"https://api.github.com/users/birdsarah/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T09:55:52Z","updated_at":"2016-08-18T09:55:52Z","body":"Superseded by: #4983"}}
{"actor":{"display_login":"birdsarah"}}