The hover tool shows the related information whenever the mouse pointer is placed over a particular area. Let's see examples to understand the hovering plots:
# Import the required modules
from bokeh.plotting import figure
from bokeh.plotting import output_notebook
from bokeh.plotting import show
from bokeh.models import CategoricalColorMapper
from bokeh.models import HoverTool
# Import iris flower dataset as pandas DataFrame
from bokeh.sampledata.iris import flowers as df
# Output to notebook
output_notebook()
# Create color mapper for categorical column
mapper = CategoricalColorMapper(factors=['setosa', 'virginica', 'versicolor'],
palette=['blue', 'green', 'red'])
color_dict={'field': 'species','transform': mapper}
# Create hovertool and specify the hovering information
hover = HoverTool(tooltips=[('Species type','@species'),
...