Speed limitation of the continuous image update

Hi!

I started playing around with bokeh, and I am trying to get continuous image updating to compare its speed to the matplotlib. The server is running on a
hardware platform which is similar to raspoberry pi, and i am using jupyter notebook. For now the code using bokeh is slower, bot looking around I saw that there
should be a possibility that only parts of the plot (image) are updated. I would like to update line by line, but I am not sure how to accomplish that (if its possible).

Can anyone help? I am running bokeh 0.12.7…

Currently I am using this code:

output_notebook()

my_figure = figure(plot_width=800, plot_height=400)

data_array =np.zeros((200,200))
test_data = data_array

x_range = [0, data_array.shape[0]]
y_range = [0, data_array.shape[1]]

p = figure(x_range=y_range, y_range=x_range)

r_blur = p.image(image=[data_array],
x=[0],
y=[0],
dw=[data_array.shape[1]],
dh=[data_array.shape[0]],
palette=“Spectral11”
)

handle = show(p, notebook_handle=True)

new_data=data_array

step = 0
step_size = 1
max_step = 100
period = .01
n_show = 10
while step < max_step:

data_array[step,:] = np.random.rand(200)

r_blur.data_source.data['image'] =[data_array]

push_notebook(handle=handle)
step += step_size

Thanks in advance!

The fast binary array transport update landed in 0.12.9:

https://bokeh.github.io/blog/2017/9/12/release-0-12-9/

You will have to move to that version or newer to take advantage of it.

Thanks,

Bryan

···

On Jan 21, 2018, at 13:42, [email protected] [email protected] wrote:

Hi!

I started playing around with bokeh, and I am trying to get continuous image updating to compare its speed to the matplotlib. The server is running on a
hardware platform which is similar to raspoberry pi, and i am using jupyter notebook. For now the code using bokeh is slower, bot looking around I saw that there
should be a possibility that only parts of the plot (image) are updated. I would like to update line by line, but I am not sure how to accomplish that (if its possible).

Can anyone help? I am running bokeh 0.12.7…

Currently I am using this code:

output_notebook()

my_figure = figure(plot_width=800, plot_height=400)

data_array =np.zeros((200,200))
test_data = data_array

x_range = [0, data_array.shape[0]]
y_range = [0, data_array.shape[1]]

p = figure(x_range=y_range, y_range=x_range)

r_blur = p.image(image=[data_array],
x=[0],
y=[0],
dw=[data_array.shape[1]],
dh=[data_array.shape[0]],
palette=“Spectral11”
)

handle = show(p, notebook_handle=True)

new_data=data_array

step = 0
step_size = 1
max_step = 100
period = .01
n_show = 10
while step < max_step:

data_array[step,:] = np.random.rand(200)

r_blur.data_source.data['image'] =[data_array]

push_notebook(handle=handle)
step += step_size

Thanks in advance!

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/0d7888d1-76ad-4b69-ba97-21404b64dcb8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.