Two figure-level "explore everything" charts. pairplot draws a grid of every variable against every other; jointplot focuses on one pair with its marginal distributions attached.
pairplot — all pairs
sns.pairplot(penguins, hue="species")# off-diagonal: scatter of each variable pair; diagonal: each variable's distribution
jointplot — one pair, in depth
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm",hue="species", kind="scatter") # kind: scatter | kde | hex | reg
Key takeaways
- 01pairplot draws every variable against every other — a scatterplot matrix with distributions on the diagonal.
- 02It's an ideal first look at a dataset; hue colours by a group/target.
- 03jointplot focuses on one pair with attached marginal distributions.
- 04jointplot kind = scatter/kde/hex/reg.
