Thank you, but if I do that it the HTML page only shows up after the loop has finished. I only see the end result, I don’t see the data being streamed.
Also, I’m trying to run the first streaming example using Pipes in a notebook as follows:
import time
import numpy as np
import pandas as pd
import holoviews as hv
import streamz
import streamz.dataframe
from bokeh.plotting import show
from holoviews import opts
from holoviews.streams import Pipe, Buffer
hv.extension('bokeh')
pipe = Pipe(data=[])
vector_dmap = hv.DynamicMap(hv.VectorField, streams=[pipe])
vector_dmap.opts(color='Magnitude', xlim=(-1, 1), ylim=(-1, 1))
vector_dmap
x,y = np.mgrid[-10:11,-10:11] * 0.1
sine_rings = np.sin(x**2+y**2)*np.pi+np.pi
exp_falloff = 1/np.exp((x**2+y**2)/8)
for i in np.linspace(0, 1, 25):
time.sleep(0.1)
pipe.send((x,y,sine_rings*i, exp_falloff))
But I only get a blank output cell. I’m definitely missing something basic, could you please let me know what it is? I assume the line vector_dmap should display the plot, but that’s not happening.