Configuring Plot Tooltips in Bokeh Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report Bokeh is a powerful data visualization library in Python that allows you to create interactive and visually appealing plots. The Bokeh plotting module provides several tools that can be used to enhance the functionality of the plots. These tools can be configured to suit your specific needs. In this article, we will learn about the Configuring Plot Tools in Bokeh in Python with some examples. Tooltips with Python's Bokeh One of the key features of Bokeh is its ability to provide interactive tools that allow users to interact with the plots. Bokeh provides a number of tools that can be used to zoom, pan, select, and manipulate data on the plot. The types of gesture tools are: Pan/Drag toolsClick/Tap toolsScroll/Pinch tools For each type of gesture, only one tool can be active at any given time. The active tool is highlighted on the toolbar next to the tool icon. Adding a Hover Tool to a Scatter Plot The hover tool allows users to see additional information about the data points on a plot by hovering their mouse over the point. To add a hover tool to a scatter plot in Bokeh, we need to create a HoverTool object and add it to the plot's tools list. Example In this example, we create a scatter plot using the circle method and add a HoverTool object to the plot using the add_tools method. We configure the hover tool to show the labels column in the data source when the user hovers over a data point. Python3 from bokeh.plotting import figure, output_file, show from bokeh.models import HoverTool import pandas as pd # create some data data = pd.DataFrame({'x': [1, 2, 3, 4, 5], 'y': [5, 4, 3, 2, 1], 'labels': ['A', 'B', 'C', 'D', 'E']}) # create a figure p = figure(title='Scatter Plot with Hover Tool') # add scatter plot p.circle(x='x', y='y', source=data, size=10) # add hover tool hover = HoverTool(tooltips=[('Label', '@labels')]) p.add_tools(hover) # show the plot show(p) Output: Adding a Box Zoom Tool to a Line Plot The box zoom tool allows users to zoom in on a specific region of a plot by drawing a box around the area they want to zoom in on. To add a box zoom tool to a line plot in Bokeh, we need to create a BoxZoomTool object and add it to the plot's tools list. Example In this example, we create a line plot using the line method and add a BoxZoomTool object to the plot using the add_tools method. Python3 from bokeh.plotting import figure, output_file, show from bokeh.models import BoxZoomTool import numpy as np # create some data x = np.linspace(0, 2*np.pi, 100) y = np.sin(x) # create a figure p = figure(title='Line Plot with Box Zoom Tool') # add line plot p.line(x, y) # add box zoom tool box_zoom = BoxZoomTool() p.add_tools(box_zoom) # show the plot show(p) Output: Adding a Tap Tool to a Bar Chart The tap tool allows users to select a data point on a plot by clicking on it. To add a tap tool to a bar chart in Bokeh, we need to create a TapTool object and add it to the plot's tools list. Example In this example, we create a bar chart using the bar method of the figure object. We then create a HoverTool object and configure it to show the y value of each bar when the user hovers over it. Finally, we add the HoverTool to the figure object using the add_tools method. The resulting chart will be saved to an HTML file named "bar_chart.html" and displayed in a web browser window Python3 from bokeh.io import output_file, show from bokeh.plotting import figure from bokeh.models import ColumnDataSource, HoverTool # create some sample data x = ['A', 'B', 'C', 'D', 'E'] y = [10, 20, 30, 40, 50] # create a ColumnDataSource with the data source = ColumnDataSource(data=dict(x=x, y=y)) # create the figure p = figure(x_range=x) # add the bars to the figure p.vbar(x='x', top='y', width=0.9, source=source) # configure the tooltip hover = HoverTool(tooltips=[("Value", "@y")]) p.add_tools(hover) # show the figure output_file("bar_chart.html") show(p) Output: Comment More infoAdvertise with us Next Article Bokeh - Adding Widgets prathamsahani0368 Follow Improve Article Tags : Data Visualization AI-ML-DS Python-Bokeh AI-ML-DS With Python Similar Reads Python Bokeh tutorial - Interactive Data Visualization with Bokeh Python Bokeh is a Data Visualization library that provides interactive charts and plots. Bokeh renders its plots using HTML and JavaScript that uses modern web browsers for presenting elegant, concise construction of novel graphics with high-level interactivity. Features of Bokeh: Flexibility: Boke 15+ min read Getting started With BokehIntroduction to Bokeh in PythonBokeh is a Python interactive data visualization. Unlike Matplotlib and Seaborn, Bokeh renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Features of Bokeh: Some o 1 min read How to Install Python Bokeh Library on Windows?There are different types of data visualization modules in Python like Matplotlib, Seaborn, or Plotly among them Bokeh module is one which is used to capsulate information or data in the form of graphs and charts which are embedded in flask and Django applications. This module is also used for makin 2 min read How to Install Bokeh in Python3 on MacOS?Data visualization is the graphical representation of information and data with the help of charts and graphs. There are different types of well-known data visualization libraries like Matplotlib, Seaborn or Plotly for presenting information and data in the form of charts and graphs. Bokeh is also a 2 min read Python - Setting up the Bokeh EnvironmentBokeh is supported on CPython versions 3.6+ only both with Standard distribution and Anaconda distribution. Other Python versions or implementations may or may not function. Current version of Bokeh is 2.0.2 . Bokeh package has the following dependencies: 1. Required Dependencies PyYAML>=3.10pyth 1 min read Plotting Different Types of PlotsPython Bokeh - Plotting Vertical Bar GraphsBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.Bokeh can be used to plot vertical bar graphs. Plotting vert 4 min read Python Bokeh - Plotting a Scatter Plot on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot a scatter plot on a graph. Plotti 2 min read Python Bokeh - Plotting Patches on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot patches on a graph. Plotting patc 2 min read Make an area plot in Python using BokehBokeh is a Python interactive data visualization. Unlike Matplotlib and Seaborn, Bokeh renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Plotting the Area Plots A 2 min read Python Bokeh - Making a Pie ChartBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Let us see how to plot a pie chart in Bokeh. Does not provi 3 min read Annotations and LegendsPython Bokeh - Making Interactive LegendsBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. How to make Interactive legends? The legend of a graph refl 2 min read Bokeh - Annotations and LegendsPrerequisites: Bokeh Bokeh includes several types of annotations to allow users to add supplemental information to their visualizations. Annotations are used to add notes or more information about a topic. Annotations can be titles, legends, Arrows, bands, labels etc. Adding legends to your figures 2 min read Creating Diffrent ShapesPython Bokeh - Plotting Ovals on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot ovals on a graph. Plotting ovals 4 min read Python Bokeh - Plotting Triangles on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot triangles on a graph. Plotting tr 2 min read Python Bokeh - Plotting Multiple Polygons on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.Bokeh can be used to plot multiple polygons on a graph. Plot 3 min read Python Bokeh - Plotting Rectangles on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot rectangles on a graph. Plotting r 2 min read Plotting Multiple PlotsBokeh - Vertical layout of plotsBokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive data applications. The layout functions helps build a grid of plots and widgets. It supports nesting of as many rows, columns, or grids of plots together 2 min read Bokeh - Horizontal layout of plotsBokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive dashboards or data applications. The layout functions let you build a grid of plots and widgets. You can nest as many rows, columns, or grids of plots tog 2 min read Bokeh - grid layout of plotsBokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive dashboards or data applications. The layout functions let you build a grid of plots and widgets. You can nest as many rows, columns, or grids of plots tog 5 min read Functions in Bokehbokeh.plotting.figure.cross() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, HTML, and server. Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with de 2 min read bokeh.plotting.figure.diamond_cross() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like a notebook, HTML and server. Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with d 2 min read bokeh.plotting.figure.step() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.circle_cross() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.annular_wedge() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.arc() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.asterisk() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.bezier() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.circle_x() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.circle() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read bokeh.plotting.figure.annulus() function in PythonBokeh is a data visualization library in Python that provides high-performance interactive charts and plots and the output can be obtained in various mediums like notebook, html and server. The Figure Class create a new Figure for plotting. It is a subclass of Plot that simplifies plot creation with 4 min read Interactive Data VisualizationConfiguring Plot Tooltips in BokehBokeh is a powerful data visualization library in Python that allows you to create interactive and visually appealing plots. The Bokeh plotting module provides several tools that can be used to enhance the functionality of the plots. These tools can be configured to suit your specific needs. In this 4 min read Bokeh - Adding WidgetsBokeh is a Python data visualization library for creating interactive charts & plots. It helps us in making beautiful graphs from simple plots to dashboards. Using this library, we can create javascript-generated visualization without writing any scripts. What is a widget? Widgets are interactiv 11 min read GraphPython Bokeh - Plotting a Line GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot a line graph. Plotting a line gra 4 min read Python Bokeh - Plotting Multiple Lines on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot multiple lines on a graph. Plotti 3 min read Python Bokeh - Plotting Horizontal Bar GraphsBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot horizontal bar graphs. Plotting h 4 min read Python Bokeh - Plotting Vertical Bar GraphsBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.Bokeh can be used to plot vertical bar graphs. Plotting vert 4 min read Python Bokeh - Plotting a Scatter Plot on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot a scatter plot on a graph. Plotti 2 min read Python Bokeh - Plotting Patches on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot patches on a graph. Plotting patc 2 min read Make an area plot in Python using BokehBokeh is a Python interactive data visualization. Unlike Matplotlib and Seaborn, Bokeh renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Plotting the Area Plots A 2 min read Python Bokeh - Plotting Wedges on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot wedges on a graph. Plotting wedge 3 min read Python Bokeh - Making a Pie ChartBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Let us see how to plot a pie chart in Bokeh. Does not provi 3 min read Python Bokeh - Plotting Triangles on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot triangles on a graph. Plotting tr 2 min read Python Bokeh - Plotting Ovals on a GraphBokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot ovals on a graph. Plotting ovals 4 min read Building Advanced Visualizations with GlyphsGlyphs in BokehBokeh is a library of Python which is used to create interactive data visualizations. In this article, we will discuss glyphs in Bokeh. But at first let's see how to install Bokeh in Python. Installation To install this type the below command in the terminal. conda install bokeh Or pip install bokeh 6 min read Create a plot with Multiple Glyphs using Python BokehIn this article, we will be learning about multiple glyphs and also about adding a legend in bokeh. Now bokeh provides us with a variety of glyphs that can be used to represent a point in a plot. Some glyphs are circle, square, asterik, inverted_triangle(), triangle() etc. Installation This module d 7 min read Make an Circle Glyphs in Python using BokehBokeh is a Python interactive data visualization. Unlike Matplotlib and Seaborn, Bokeh renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Plotting the Circle Glyph 4 min read Like