Interactive visualization for Python

Interactive visualizations for modern browsers.

Bokeh is a Python library for interactive plots and data applications in modern web browsers. Start with high-level plotting tools, then use layouts, widgets, and models when you need more control.

pip install bokeh
  • Python-native
  • No JavaScript required
  • BSD licensed

Common workflows

Use Bokeh where you already work.

Build plots in Jupyter, publish them on a web page, or add Python callbacks with the Bokeh server.

01Jupyter
A Bokeh ridge plot rendered inline below Python code in JupyterLab

Explore data in notebooks

Place interactive plots beside your analysis in Jupyter notebooks and JupyterLab.

Use Bokeh in Jupyter
02Standalone

Publish anywhere

Save a standalone HTML file or embed a plot in an existing page. Neither option needs a Python server.

Publish and embed
03ASGI
The animated Dask diagnostic dashboard built with Bokeh

Add live Python callbacks

Mount Bokeh in FastAPI, Starlette, Django, or another ASGI app, and serve it with Uvicorn or Hypercorn. No separate Bokeh process is needed.

Use Bokeh with ASGI

A small example

Python to the browser.

Bokeh handles rendering in the browser and provides tools for pan, zoom, hover, and selection.

See the first steps
first_plot.pyPython
01 from bokeh.plotting import figure, show
02
03 x = [1, 2, 3, 4, 5]
04 y = [6, 7, 2, 4, 5]
05
06 p = figure("A first Bokeh plot")
07 p.line(x, y, line_width=3)
08 p.scatter(x, y, size=9)
09 show(p)
Output ready in your browser

Bokeh at a glance

Built for real analytical work.

Use bokeh.plotting to make a first chart. For a custom application, work directly with plots, widgets, layouts, and other Bokeh models.

A

Built-in interaction

Bokeh plots include tools for pan, zoom, hover, selection, linking, filtering, and editable data.

B

High-level and low-level APIs

Start with bokeh.plotting, then use layouts, widgets, annotations, models, themes, and extensions as needed.

C

Streaming and larger data

Stream or patch data without replacing the full data source. Supported glyphs can use WebGL acceleration.

D

Several ways to publish

Show plots in notebooks, save standalone HTML, embed components in a web app, or run a Bokeh server.

Live demos

Try Bokeh in a live application.

View all demos

Open source

Open source visualization,
driven by community.

Bokeh is a fiscally sponsored NumFOCUS project, built and maintained by contributors on GitHub.