Joint Plots
What is a joint plot?
A joint plot shows:
- A bivariate relationship (scatter/KDE/hex)
- Marginal distributions on the sides
It’s a compact EDA tool.
flowchart TD A["x, y columns"] --> B["Center panel:
scatter / KDE / hex"] A --> C["Top margin:
histogram of x"] A --> D["Right margin:
histogram of y"]
Joint plot (scatter + hist)
jointplot
import seaborn as sns
tips = sns.load_dataset("tips")
sns.jointplot(data=tips, x="total_bill", y="tip", kind="scatter")jointplot
import seaborn as sns
tips = sns.load_dataset("tips")
sns.jointplot(data=tips, x="total_bill", y="tip", kind="scatter")Joint plot with KDE
jointplot kde
import seaborn as sns
tips = sns.load_dataset("tips")
sns.jointplot(data=tips, x="total_bill", y="tip", kind="kde", fill=True)jointplot kde
import seaborn as sns
tips = sns.load_dataset("tips")
sns.jointplot(data=tips, x="total_bill", y="tip", kind="kde", fill=True)Visualize it
The center shows how the two variables relate; the strips along the top and right edges show each variable’s own shape, on its own:
Tips
- For large data,
kind="hex"kind="hex"is useful to reduce overplotting. - Joint plots are figure-level, so customization is slightly different.
Next
Continue to Pair Plots to see every pairwise relationship across several variables at once.
🧪 Try It Yourself
Exercise 1 – A Basic Joint Plot
Exercise 2 – Switch the Center Panel to KDE
Exercise 3 – Reduce Overplotting With Hex
If this helped you, consider buying me a coffee ☕
Buy me a coffeeWas this page helpful?
Let us know how we did
