维护者注意:这个问题已经过时了。figure
在自动组合上调用多个字形方法(并且已经使用了很多年)。有关现代散景的信息,请参阅:
https://docs.bokeh.org/en/latest/docs/user_guide/plotting.html
过时的:
我正在 IPython 笔记本中运行 Bokeh 教程。它只显示散点图而不显示折线图。从命令行它分别呈现两个图。
如何在同一个图表中将两个图表放在一起?
import numpy as np
import bokeh.plotting as bplt
bplt.output_file("bokehtest.html")
#bplt.output_notebook(url=None)
x = np.linspace(-2*np.pi, 2*np.pi, 100)
y = np.cos(x)
bplt.line(x, y, color="red")
bplt.scatter(x, y, marker="square", color="blue")
bplt.show()