我正在尝试使用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)