Matplotlib and seaborn 3 · Chart types

Scatter plot

Plot two variables as points, colored by a third.

rng = np.random.default_rng(0)
x, y, size = rng.random(50), rng.random(50), rng.random(50)
plt.scatter(x, y, c=size, cmap="viridis")
plt.colorbar(label="size")

Official Matplotlib and seaborn 3 documentation

More chart types commands

All chart types commands · Matplotlib and seaborn 3 cheatsheet

Was this page helpful?