Create a grid of linked interactive bokeh-datashader plots
See original GitHub issueI would like to create a grid of bokeh-datashader plots using something like:
plots = []
plots.append(InteractiveImage(p1, image_callback1))
plots.append(InteractiveImage(p2, image_callback2))
plots.append(InteractiveImage(p2, image_callback3))
bokeh.layouts.gridplot([[plots[0], plots[1], plots[2]]])
while also linking the plot ranges using something like this
for p in plots:
p.x_range = plots[0].x_range
p.y_range = plots[0].y_range
so that adjusting the range of one of the plots also adjusts the range of all the plots, while updating the datashader displays. I realize what I have does not work, because InteractiveImage
does not return a bokeh plot object. Is there currently a way to do this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Create a grid of linked interactive bokeh-datashader plots #290
I would like to create a grid of bokeh-datashader plots using something like: plots = [] plots.append(InteractiveImage(p1, image_callback1)) ...
Read more >Creating layouts — Bokeh 2.4.3 Documentation
These let you arrange multiple components to create interactive dashboards and data applications. Layout functions let you build a grid of plots and...
Read more >Bokeh - grid layout of plots - GeeksforGeeks
The layout functions let you build a grid of plots and widgets. You can nest as many rows, columns, or grids of plots...
Read more >Grids and Graphs - Red Blob Games
Yes: a grid can be viewed as a special case of a graph. ... make a list of the nodes in the graph,...
Read more >Bokeh Tutorial — Adding Interactions - | notebook.community
For now you, Bokeh provides simple layout capability for grid plots, VBoxes, ... In [7]:. # EXERCISE: create two plots in a gridplot,...
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
HoloVIews 1.7 has been released, and can be installed using
conda install -c ioam holoviews
. This version includes full support for datashader, as outlined in the greatly expanded HoloViews Datashader notebook. You should be able to run that notebook and see how to combine multiple Datashader plots into any arrangement, e.g.(q1+q2+q3+q4+q5+q6).cols(3)
. Note that datashader itself has not yet been released, so until it is you’ll need the git master version.It might be possible to modify InteractiveImage to do this, but instead I think you ought to be using HoloViews for anything but a single, isolated datashader plot. InteractiveImage is a tiny piece that we originally took out of HoloViews to show off how datashader works, but for anything ambitious, I’d recommend just using HoloViews itself.
The HoloViews API is formulated at a level one step higher than Bokeh’s, which makes it vastly simpler to do things like dynamically updating an underlying plot, as InteractiveImage needs to do, while also embedding the plot into a larger layout. E.g. combining two interactive datashader-based Bokeh plots X and Y with linked axes in HoloViews is normally just “X+Y”.
We are gearing up for a release of HoloViews that has documentation for how to use it with datashader, but meanwhile there are examples in this HoloViews Datashader notebook. Code for doing what you outline above should be one or two lines, in HoloViews. Basically, use NdLayout if your “Q” values can be interpreted as a dimension (values along some axis), and otherwise use Layout (which is what the “+” operator constructs).