Skip to content Skip to sidebar Skip to footer

How Can I Get The Bokeh Hover Tool To Snap To The Data?

I would like the bokeh hover tool to snap to the data points instead of interpolating the mouse position on the line. Here's the code that I thought would do it, but I'm still gett

Solution 1:

You're not passing your custom HoverTool instance to the plot. You need to do:

...
p = figure(tools="pan,box_zoom,reset,save",
           y_axis_type="log", y_range=[0.001, 10**11], title="log axis example",
           x_axis_label='sections', y_axis_label='particles')
p.add_tools(hover) # this is your custom HoverTool
...

Post a Comment for "How Can I Get The Bokeh Hover Tool To Snap To The Data?"