Visualizing data
Use matplotlib — reliable, scriptable, and produces a plain PNG that drops into a doc, deck, or presents directly.
pip install matplotlib
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(8, 5))
ax.bar(["Q1", "Q2", "Q3", "Q4"], [12, 19, 15, 24])
ax.set_title("Revenue by quarter")
ax.set_ylabel("$K")
fig.savefig("/home/user/chart.png", dpi=150, bbox_inches="tight")
Pick the chart type deliberately: trend over time → line, parts of a whole → pie only if ≤5 slices (otherwise a bar), comparison across categories → bar, relationship between two variables → scatter.
For a chart destined for a slide or doc, generate the PNG first, then embed it (see generating-slide-decks / generating-word-docs) — don't try to build a native chart object in pptx/docx.
For a chart the user should see directly in chat, present_file the PNG.