0
私はBokehを実験していて、ホルトゥルールに不満を感じています。対象となる基本的なツールチップの1つとして塗りつぶしの色を示します。ホバーのツールチップにBokehの色が表示されない
http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#hover-tool
私がテストを試してみましたが、色がhovertoolに表示されません。それは私に "???"それはあなたがそれを理解できない入力を与えると通常それを完全に無視します。誰もが基本的なツールチップの1つを表示しない理由についての手掛かりを持っていますか?
from bokeh.plotting import figure, output_file, show, ColumnDataSource
from bokeh.models import HoverTool
output_file("toolbar.html")
source = ColumnDataSource(
data=dict(
x=[1, 2, 3, 4, 5],
y=[2, 5, 8, 2, 7],
desc=['A', 'b', 'C', 'd', 'E'],
)
)
hover = HoverTool(
tooltips=[
("fill color", "$color[hex, swatch]:fill_color"),
("index", "$index"),
("(x,y)", "($x, $y)"),
("desc", "@desc"),
]
)
p = figure(plot_width=400, plot_height=400, tools=[hover],
title="Mouse over the dots")
p.circle('x', 'y', size=20, source=source, fill_color="black")
show(p)
面白い、私はそれがサークルラインから塗りつぶしの色を引っ張った仮定のです。知っておいて、助けてくれてありがとう! – BikeControl