Architecture · Line Charts · Bar Charts · Scatter Plots · Histograms · Saving
fig, ax = plt.subplots(figsize=(8,5))ax.plot()) preferred over pyplot APIax.plot(x, y) — basic line chartlinewidth, linestyle, marker, colorax.plot() multiple timesax.bar(categories, values) — vertical barsax.barh() — horizontal (better for long labels)width, color, edgecolor, alphaax.scatter(x, y) — individual data pointsc=color_array, s=size_arrayalpha for transparency on dense dataax.hist(data, bins=20) — frequency distributiondensity=True for proportion instead of countplt.savefig("chart.png", dpi=300, bbox_inches="tight")