On Mar 3, 2016, at 9:29 AM, RedRaven <remus984@gmail.com> wrote:
Nobody? let me add some more information. The data update happens in a callback function:
def update():
H_store.append(humidity) # store the humidity value in an array
ard_humd.data_source.data["x"] = np.linspace(-10*len(AH_store), 0, len(AH_store))
ard_humd.data_source.data["y"] = AH_store
the update function is periodically called to update the plot. Here is my update call.
curdoc().add_periodic_callback(update, 100)
I tested the functionality across Chrome, Firefox and IE. It looks like if I increase the callback interval it does not free. However, if I increase the callback too much I will start to lag behind the real-time process.
Its my impression that Bokeh is supposed to help with real-time graphics. How can I optimize this so that Im not freezing the plot updates but Im also fast enough for the process.
Anyone?
On Wednesday, 2 March 2016 17:54:52 UTC-5, RedRaven wrote:
Hi All,
I'm trying to plot data streaming from a room humidity sensor. The data plots file for a few points then almost stops updating despite new points coming in. Ive tried this in both Firefox and Chrome with the same effect. Here is my plot setup:
# Setup the room humidity
p_humd = figure(plot_width=250,plot_height=250,x_range=(-300,0), y_range=(20,40),title_text_font_size='8pt', toolbar_location=None)
p_humd.outline_line_color = "navy"
p_humd.outline_line_width = 7
p_humd.outline_line_alpha = 0.3
p_humd.background_fill_color = 'white'
p_humd.outline_line_color = None
p_humd.grid.grid_line_color = None
ard_humd = p_humd.line(x=, y=,color='navy', line_width=4)
p_humd.title = "Relative Humidity"
p_humd.xaxis.axis_label = 'seconds'
p_humd.yaxis.axis_label = '%'
p_humd.xaxis.axis_label_text_font_size = '8pt'
p_humd.yaxis.axis_label_text_font_size = '8pt'
Here is how I update the data in the plot:
H_store.append(humidity) # store the humidity value in an array
ard_humd.data_source.data["x"] = np.linspace(-10*len(AH_store), 0, len(AH_store))
ard_humd.data_source.data["y"] = AH_store
Why is this so slow?
Thanks!
--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5d2665be-bc72-48b2-aac9-9b020d30891b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.