I want to have my hovertool, showing only when I hover above the diamonds. As you will see my plot contains diamonds and lines.
tooltips = [("Year", "@x{0}"), ("Numbers", "@y{0}")]
p = figure(plot_width=800, plot_height=400,tooltips=tooltips)
p.diamond(df3reset["Years"], df3reset["Numbers"], size=20,
color="navy", alpha=0.5)
p.line(df3reset["Years"], df3reset["Numbers"], line_width=2)
p.xaxis.axis_label = 'Year'
p.yaxis.axis_label = 'Number of dogs'
show(p)
I dont want the hovertool to show the information on the line only while hovering over the diamonds, what would be the solution?
Greetings
This can also be accomplished keeping
tooltips
as you currently have:Remove
tooltips
fromfigure
then: