Interactive Datashader + Holoviews Plot does not Update in VSCode
See original GitHub issueDescription
When plotting interactively using Datashader and Holoviews it does not update the data shading when zooming in. This is only the case when plotting via a Jupyter session in VSCode. It works when using a standalone Jupyter session.
Here is the code I have used:
# %%
import os
import datashader as ds
import pandas as pd
from colorcet import fire
from datashader import transfer_functions as tf
import holoviews as hv
import geoviews as gv
from holoviews.operation.datashader import datashade
hv.extension("bokeh")
data_path = os.path.expanduser("~/Downloads/test_data/nyc_taxi.csv")
df = pd.read_csv(
data_path,
usecols=["dropoff_x", "dropoff_y"],
)
agg = ds.Canvas().points(df, "dropoff_x", "dropoff_y")
tf.set_background(tf.shade(agg, cmap=fire), "black")
url = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}.jpg"
tile_opts = dict(
width=1000,
height=600,
xaxis=None,
yaxis=None,
bgcolor="black",
show_grid=False,
)
map_tiles = gv.WMTS(url).opts(style=dict(alpha=0.5), plot=tile_opts)
points = hv.Points(df, ["dropoff_x", "dropoff_y"])
taxi_trips = datashade(
points,
x_sampling=1,
y_sampling=1,
cmap=fire,
width=1000,
height=600,
)
map_tiles * taxi_trips
Environment (truncated)
OS: Ubuntu 18.04
VSCode version: 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8 x64)
# Name Version Build Channel
anaconda 2019.03 py37_0
bokeh 1.0.4 py37_0
colorcet 2.0.1 py_0 pyviz
conda 4.6.11 py37_0
conda-build 3.17.8 py37_0
conda-env 2.6.0 1
conda-verify 3.1.1 py37_0
datashader 0.6.8 py_0 pyviz
geos 3.7.1 he6710b0_0
geoviews 1.6.2 py_0 pyviz
geoviews-core 1.6.2 py_0
holoviews 1.11.0 pyh39e3cac_0 pyviz
hvplot 0.4.0 py_0 pyviz
ipykernel 5.1.0 py37h39e3cac_0
ipython 7.4.0 py37h39e3cac_0
ipython_genutils 0.2.0 py37_0
ipywidgets 7.4.2 py37_0
jupyter 1.0.0 py37_7
jupyter_client 5.2.4 py37_0
jupyter_console 6.0.0 py37_0
jupyter_core 4.4.0 py37_0
jupyterlab 0.35.4 py37hf63ae98_0
jupyterlab_server 0.2.0 py37_0
python 3.7.3 h0371630_0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Interactive Datashader + Holoviews Plot does not Update in ...
Description When plotting interactively using Datashader and Holoviews it does not update the data shading when zooming in.
Read more >Interactivity — Datashader v0.14.3
HoloViews (1.7 and later) is a high-level data analysis and visualization library that makes it simple to generate interactive Datashader-based plots.
Read more >Installation — HoloViews v1.15.3
Stop plotting your data - annotate your data and let it visualize itself. HoloViews is an open-source Python library designed to make data...
Read more >Using Holoview, datashader plot dynamicmap but freeze
Basic needs: plot a map, and update accoding to variable. Challenges: have to use rasterize, aggregation by datashade (big data); holoviews .
Read more >HoloViews - HoloViz Discourse
Topic Replies Views Activity
DynamicMap fails when dtype changes on axis 0 92 August 18, 2022
Orthogonal view of a 3D data set · bokeh...
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
It is quite unlikely this will ever work. Communication between JS and python requires a live websocket. It may be possible to get this working by embedding a bokeh server but the usual notebook display machinery in VSCode does not support websocket comms afaik.
it works now with panel.extension(comms=‘vscode’), can close issue