
I’m trying to rapidly update image data in a Bokeh figure in the notebook.
I make a figure and ColumnDataSouce like so
from bokeh.plotting import ColumnDataSource, figure, output_notebook, show
output_notebook()
import numpy as np
img = np.random.random((1000, 1000))
fig = figure(title="foo")
source = ColumnDataSource({'value': [img]})
fig.image('value', source=source, x=0, y=0, dw=64, dh=64)
show(fig)
But then when I update the ColumnDataSource my output cell doesn’t change
source.data.update({"value": [np.ones((1000, 1000))]})
If I show the figure again then I get a new output cell with the appropriate updates, but I would ideally like to just keep pushing to the same output cell.
Any tips?

