question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

holoviews.streams.update is not embedded into HTML on save

See original GitHub issue

In the first cell I do this:

%%opts Scatter3D [width=800 height=800 color_index=2] (cmap='Viridis')
import holoviews as hv
import numpy as np
from holoviews.plotting import plotly
hv.notebook_extension(plotly=True)
from holoviews.streams import PositionX
xs,ys = np.mgrid[-50:51, -50:51] * 0.07
N = 100
random_x = np.random.randn(N)
random_y = np.random.randn(N)
random_z = np.random.randn(N)
stream = PositionX()
hv.DynamicMap(lambda x: hv.Scatter3D((random_x, random_y, random_z*x)), kdims=[], streams=[stream])

And at the next cell I put this:

stream.update(x=100)

Then I’m saving the resulted plot as HTML - but getting the plot before the update and not after the update.

Is it a bug in Plotly - or it’s by design and there is no way to fix it? Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jlstevenscommented, Mar 9, 2017

I suspect this is because streams are currently integrated with the matplotlib and bokeh backends but not the plotly backend. I’ll assign this issue to the 1.7 milestone as we need to investigate how plotly will work with streams before then.

0reactions
philippjfrcommented, Mar 9, 2017

I did the cast but the plot disappeared…

You need to cast it after you’ve displayed it once.

I meant expanding the cache size to be greater than 1 so you can capture a sequence of updates via streams.

The default cache size is 500 anyway, the example above use streams so by default the cache is fixed at length 1. A user would have to explicitly declare key dimensions for the streams for the cache to work properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ — HoloViews v1.15.3
A: It is very easy to visualize large volumes of data with HoloMaps, and all available display data is embedded in the HTML...
Read more >
Working with Plot and Renderers — HoloViews v1.15.3
Saving and rendering#. The easiest entry points to rendering a HoloViews object either to the backend specific representation (e.g. a matplotlib figure) or ......
Read more >
Deploying Bokeh Apps — HoloViews v1.15.3
This command will generate a file out.html that you can put on any web server, email directly to colleagues, etc.; it is fully...
Read more >
Responding to Events — HoloViews v1.15.3
Before introducing streams, let us declare a simple DynamicMap of the sort discussed in the Live Data user guide. This example consists of...
Read more >
Creating interactive dashboards — HoloViews v1.15.3
Both Panel and HoloViews are built on the param library, which lets you capture the definitions and allowable values for your widgets in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found