HV to use Bokeh sources directly
See original GitHub issueSince there is such a tight integration between Holoviews and Bokeh, is it possible to use Bokeh ColumnDataSource (and by extension AjaxDataSource) to feed the HV plots? A trivial example would be:
xs = range(-10,11)
ys = [100-x**2 for x in xs]
source = ColumnDataSource({'xs':xs, 'ys':ys})
#Bokeh
p = figure(plot_width=400, plot_height=400)
p.line('xs', 'ys', source=source)
show(p)
#Current Holoviews
curve = hv.Curve((xs, ys))
curve
#Proposed Holoviews
curve = hv.Curve(('xs', 'ys'), source=source)
curve
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
HV to use Bokeh sources directly #2978 - holoviz/holoviews
The advantage (to my limited understanding) is that you can have a static HTML showing the visualisation and the data for it delivered...
Read more >Providing data — Bokeh 2.4.3 Documentation
This section describes the various ways to provide data to Bokeh, from passing data values directly to creating a ColumnDataSource (CDS) and filtering...
Read more >Plotting with Bokeh — HoloViews v1.15.3
Plotting with Bokeh#. import numpy as np import pandas as pd import holoviews as hv from holoviews import dim, opts hv.extension('bokeh').
Read more >Python Data Visualization With Bokeh - YouTube
In this video we will get started with data visualization in Python by creating a top horsepower chart using the Bokeh ...
Read more >Visualizing Data with Bokeh and Pandas
This tutorial assumes that you have a basic knowledge of the Python language and its associated data structures, particularly lists. If you work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not entirely sure what CDS/AjaxDataSource is, but here’s a potential workaround?
Also, usually, the workflow is from holoviews -> bokeh (you can get back the bokeh object by doing
hv.renderer('bokeh').get_plot(your_holoviews_object).state
)Thanks a lot for comments and suggestions. In the end I decided to go with pure Bokeh as exporting Holoviews’ HoloMap into a static HTML didn’t work. Rather than that, I tweaked the API to accept parameters so that the API call would return the filtered data: