【发布时间】:2017-01-05 07:12:00
【问题描述】:
我正在尝试使用散景网格图布局绘制多个图表。图表已从 Notebook 成功查看,但未在浏览器中呈现。 我在浏览器中收到“Bokeh Duplicate Edit Error”。下面是我正在使用的代码。
from bokeh.plotting import figure, output_file, output_notebook,show
from bokeh.charts import Line
from bokeh.layouts import gridplot
import pandas as pd
df= pd.read_csv("C:/tps.csv")
df1= pd.read_csv("C:/abc.csv")
p1=Line(df,title="Test1")
p2=Line(df1,title="Test2")
grid = gridplot([[p1, p2]], toolbar_location=None)
# show the results
output_file('Test.html')
output_notebook()
show(grid)
我无法找出我犯了什么错误。任何指针都会有帮助。 感谢您的帮助
【问题讨论】:
-
这似乎是一个可能的错误。但是,为了提供帮助,我必须运行代码并重现问题,这对于上面的代码是不可能的,因为没有提供数据文件。请在GitHub issue tracker 上提交包含完整、最少示例代码的错误报告
-
将 'pd.read_csv' 调用替换为 'np.arange' 调用并使用 bokeh 0.12,此代码生成两个折线图并且没有错误。也许 v0.12 解决了根本问题。