1

I'm would like to make a live-updating plot using Bokeh. I've run this example, but the plot resizes to show all of my data. How do I configure the plot to scroll as the data is loaded so it only shows the most recent additions? This blog post has a link in the comments that claims it's possible (added in version 0.4), but the link is broken. I've checked the documentation for the figure object, but should my investigation focus more on the renderer?

Related to this previous question.

4

1 回答 1

3

目前(从 Bokeh 0.7.0 开始)要拥有“滚动”图,您需要自己维护数据缓冲区大小。也就是说,如果您只想拥有最多 100 个点,那么当您添加额外的数据点时,您必须在将数据传递给服务器之前开始从数据的开头删除点。

我们正在努力将此类功能集成到 Bokeh 服务器中,以便您可以使用指定的策略(始终附加、固定缓冲区大小等)将新数据推送到服务器并让它正常工作。

于 2014-12-19T21:07:01.557 回答