我正在尝试从以下数据框中绘制坐标gvri_df
:
id ob x y
0 1 1 121877.864934 487888.548119
1 2 2 121772.572154 487952.500882
2 3 3 121824.001607 487927.953991
3 4 4 121887.380073 486978.455422
4 5 5 117820.122667 487964.987875
使用以下代码
source = ColumnDataSource(gvri_df)
hover = HoverTool()
hover.tooltips=[('VRI', '@id'),
('Kruispunt', '@ob')]
p.add_tools(hover)
# Plotting
p = figure(title="VRI")
p.circle('x', 'y', source=source, color='red', size=5)
show(p)
它按预期很好地输出了绘图,只是它根本不显示悬停。就像该工具没有添加到情节中一样。
我做错了什么还是有人知道如何解决这个问题?
谢谢!