bokeh.plotting

The bokeh.plotting API is Bokeh’s primary interface, and lets you focus on relating glyphs to data. It automatically assembles plots with default elements such as axes, grids, and tools for you.

Below is a basic example:

from bokeh.plotting import figure, output_file, show

# create a Figure object
p = figure(width=300, height=300, tools="pan,reset,save")

# add a Circle renderer to this figure
p.circle([1, 2.5, 3, 2], [2, 3, 1, 1.5], radius=0.3, alpha=0.5)

# specify how to output the plot(s)
output_file("foo.html")

# display the figure
show(p)

This reference guide chapter has a few sections split out for the different main components: