In the code fragment
below (complete and runs in a Notebook) my HoverTool
definition only works for @make .
The other two fields @mpg
and @hp
just show up as ??? .
See screenshot for example. I can’t seem to see what I’m doing
wrong. Can anyone provide a suggestion?
TIA, Ian

import pandas as pd
from bokeh.charts import Scatter
from bokeh.models import HoverTool
from bokeh.io import output_notebook, show
from bokeh.sampledata.autompg import autompg
output_notebook()
autompg['make'] = pd.Series((n.split()[0] for n in autompg.name), index=autompg.index)
s = Scatter(data=autompg[autompg.make.isin('ford volkswagen honda' .split())],
x='yr', y='mpg', color='make', tools='hover'
)
hover = s.select(dict(type=HoverTool))
hover.tooltips = [
('Make','@make' ),
('MPG', '@mpg' ),
('hp', '@hp' )
]
show(s)

