Bar chart

yerr draws error bars (whiskers + caps) centered at each bar’s own top.

plot 03 bar

Live figure — pick a tool, then zoom, pan, point-pick or annotate. Nothing is active until a tool is selected.

View this figure’s Vega export ↗ — the raw JSON spec, rendered live by a real Vega engine.

View this figure’s Vega-Lite export ↗ — the raw JSON spec(s), rendered live by a real Vega-Lite engine.

import numpy as np
import plotpress

cats = np.arange(6)
fig, ax = plotpress.subplots()
ax.bar(cats, [3, 7, 2, 5, 8, 4], yerr=[0.4, 0.9, 0.3, 0.6, 1.1, 0.5], capsize=4)
ax.set_xticks(cats); ax.set_title("Bar chart"); ax.set_ylabel("value")
fig.tight_layout()

Total running time of the script: (0 minutes 0.105 seconds)

Gallery generated by Sphinx-Gallery