Plot Bokeh:如何选择单个绘图对象并链接到不同的URL
嗨,我正在使用Bokeh rect工具绘制矩形列表:Plot Bokeh:如何选择单个绘图对象并链接到不同的URL,plot,bokeh,Plot,Bokeh,嗨,我正在使用Bokeh rect工具绘制矩形列表: p.rect(xs, ys, widths, heights, fill_color="#F2583E", line_color="black",tags=rect_tags) 我希望它有以下功能:对于上面不同的矩形,每个链接到不同的url。 我尝试以下功能: url = "http://www.colors.commutercreative.com/@color/" taptool = p.select(type=TapTool) tap
p.rect(xs, ys, widths, heights, fill_color="#F2583E", line_color="black",tags=rect_tags)
我希望它有以下功能:对于上面不同的矩形,每个链接到不同的url。
我尝试以下功能:
url = "http://www.colors.commutercreative.com/@color/"
taptool = p.select(type=TapTool)
taptool.callback = OpenURL(url=url)
但它链接到所有矩形,不能指定单个矩形
如果我把它改成
taptool = p.select(type=TapTool, tags="sometag")
若要指定特定标记,链接将不起作用
你能帮助我如何实现我的功能吗?谢谢 可能的重复可能的重复