Asked over in stackoverflow here:
I would like to do the equivalent of the following Python in stand-alone BokehJS
color_mapper = bokeh.models.mappers.LogColorMapper('Viridis256',low=vmin,high=vmax)
How do I do it? Where are the color mappers located in the javascript CDN files?
They don’t seem to be here, for example:
https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.7.js
and not here either:
https://cdn.pydata.org/bokeh/release/bokeh-api-0.12.7.js
I
am trying to follow examples like these:
https://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#minimal-complete-example
Thanks in advance – Aaron Watters
– Aaron Watters
Hi Aaron,
I’ve answered on SO, but I’ll copy the answer here as well.
Models are located inside the main JS file (at least, for Bokeh 0.12.9): https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.js
You can get LogColorMapper in your code by using:
Bokeh.require('models/mappers/log_color_mapper').LogColorMapper
Regards,
Eugene
···
On Friday, October 13, 2017 at 3:25:48 AM UTC+7, Aaron Watters wrote:
Asked over in stackoverflow here:
https://stackoverflow.com/questions/46717726/how-to-create-a-bokeh-colormapper-in-javascript
I would like to do the equivalent of the following Python in stand-alone BokehJS
color_mapper = bokeh.models.mappers.LogColorMapper('Viridis256',low=vmin,high=vmax)
How do I do it? Where are the color mappers located in the javascript CDN files?
They don’t seem to be here, for example:
https://[cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.7.js](http://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.7.js)
and not here either:
https://[cdn.pydata.org/bokeh/release/bokeh-api-0.12.7.js](http://cdn.pydata.org/bokeh/release/bokeh-api-0.12.7.js)
I
am trying to follow examples like these:
https://[bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#minimal-complete-example](http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#minimal-complete-example)
Thanks in advance – Aaron Watters
– Aaron Watters