小编Mar*_*uel的帖子

如何以高刷新率将数据流式传输到Jupyter中的Bokeh图?

我正在尝试使用Bokeh在Jupyter笔记本中绘制流数据集.这是我到目前为止所拥有的.

从命令行我通过运行命令启动散景服务器

$> bokeh server
Run Code Online (Sandbox Code Playgroud)

这是我的Jupyter笔记本的代码

import numpy as np
from IPython.display import clear_output
# ------------------- new cell ---------------------#

from bokeh.models.sources import ColumnDataSource
from bokeh.client import push_session
from bokeh.driving import linear
from bokeh.plotting import figure
from bokeh.io import curdoc, output_notebook, show
# ------------------- new cell ---------------------#

output_notebook()
# ------------------- new cell ---------------------#

my_figure = figure(plot_width=800, plot_height=400)
test_data = ColumnDataSource(data=dict(x=[0], y=[0]))
linea = my_figure.line("x", "y", source=test_data)
# ------------------- new cell ---------------------#

new_data=dict(x=[0], y=[0])
x = []
y = [] …
Run Code Online (Sandbox Code Playgroud)

python plot stream bokeh jupyter-notebook

8
推荐指数
1
解决办法
3680
查看次数

标签 统计

bokeh ×1

jupyter-notebook ×1

plot ×1

python ×1

stream ×1