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.

from bokeh.plotting import figure, show

fruits = ['Apples', 'Pears', 'Nectarines', 'Plums', 'Grapes', 'Strawberries']
counts = [5, 3, 4, 2, 4, 6]

p = figure(x_range=fruits, height=350, title="Fruit Counts",
           toolbar_location=None, tools="")

p.vbar(x=fruits, top=counts, width=0.9)

p.xgrid.grid_line_color = None
p.y_range.start = 0

show(p)

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