Bokeh

3.9.0 · active · verified Thu Apr 09

Bokeh is an interactive visualization library for modern web browsers. It helps create versatile, interactive plots, dashboards, and data applications from Python, targeting web browsers for rendering. It is currently at version 3.9.0 and typically releases minor versions every few months with major versions less frequently.

Warnings

Install

Imports

Quickstart

This quickstart creates a simple interactive sine wave plot and displays it in your default web browser. For more complex interactions or live updates, consider using Bokeh server.

from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource
import numpy as np

x = np.linspace(0, 4*np.pi, 100)
y = np.sin(x)

source = ColumnDataSource(data=dict(x=x, y=y))

p = figure(width=600, height=400, title="Simple Sine Wave",
           x_axis_label='x', y_axis_label='y')
p.line('x', 'y', source=source, line_width=2)

show(p)

view raw JSON →