Excellent Tutorial ! I have a query, will be highly helpful if you pls answer. I want to keep only certain number of data-points in the plot, for example 200 points, which is ~100secs of data. any older data can just slide left. Just like how stock charts behave . In current plot it is getting resized to accommodate all data points. Can you please share what is the option to do so or give any reference link to do the same. Thanks a lot.
Great question! It's a really simple fix to the code presented in the tutorial. Just add these lines of code. You'll want to play around with the follow_interval and range_padding to get the look at feel you want. f.x_range.follow="end" f.x_range.follow_interval = 2000 # milliseconds; 200 seconds == 200000 milliseconds f.x_range.range_padding=0 Hope this helps!
Great question! The reason we cannot use a standalone app (at least with this code) is because of the last line. curdoc().add_periodic_callback(update, 500) This line allows us to time our updates and the cursor() call requires the bokeh server. I hope this helps!
@@DataScienceforEveryone That makes sense. Thanks for the quick reply. Looking forward to your more tutorials on Bokeh, especially more CustomJS and widgets stuff would be great.