Note
Go to the end to download the full example code.
Pie chart

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 plotpress
fig, ax = plotpress.subplots()
ax.pie([35, 25, 20, 20], labels=["A", "B", "C", "D"])
ax.set_title("Pie chart")
Total running time of the script: (0 minutes 0.062 seconds)