Relationship
Pair Plot / Scatter Matrix
n×n grid of scatter plots for every variable pair, with the diagonal showing each variable's distribution — letting you spot non-linear relationships, clusters, and outliers across all pairs at once before fitting any model.
Car Stats
40 cars across MPG, HP, Weight, Price
View data (40 rows)
| MPG | HP | Weight | Price |
|---|---|---|---|
| 32.30 | 133 | 2.36 | 20.70 |
| 24.60 | 226 | 3.27 | 31.40 |
| 16.60 | 223 | 4.16 | 36.50 |
| 29.60 | 102 | 2.44 | 16 |
| 18 | 251 | 4.08 | 47.10 |
| 19.70 | 182 | 3.62 | 34.70 |
| 31.90 | 70 | 2.51 | 15 |
| 22.60 | 190 | 3.40 | 38.10 |
| 32.90 | 70 | 2.30 | 15 |
| 25.60 | 229 | 2.67 | 38.40 |
| 27 | 183 | 2.84 | 33.20 |
| 32.30 | 70 | 2.05 | 15 |
| 28 | 255 | 2.14 | 43.70 |
| 22.20 | 201 | 3.63 | 33 |
| 30.40 | 139 | 2.71 | 23.60 |
| 22.80 | 280 | 3.34 | 50.20 |
| 21.20 | 271 | 3.18 | 52.50 |
| 23.80 | 209 | 2.79 | 41.60 |
| 22.90 | 144 | 3.29 | 23.80 |
| 29.40 | 142 | 2.48 | 26.10 |
| 25.40 | 135 | 3.38 | 15 |
| 36.10 | 70 | 1.90 | 15 |
| 25.90 | 162 | 3.29 | 27 |
| 21.40 | 154 | 3.50 | 25 |
| 23 | 106 | 3.25 | 17.10 |
| 31.80 | 204 | 1.96 | 33.10 |
| 30.10 | 197 | 2.60 | 29 |
| 22.50 | 205 | 3.70 | 33 |
| 18.80 | 178 | 3.86 | 29.90 |
| 37.50 | 129 | 1.53 | 26.60 |
| 23.80 | 332 | 3.24 | 55.70 |
| 32.70 | 70 | 2.36 | 15 |
| 23.90 | 210 | 2.77 | 38.30 |
| 24.90 | 155 | 3.65 | 27.60 |
| 24.60 | 253 | 2.75 | 42.80 |
| 23.70 | 159 | 3.32 | 28.20 |
| 22.30 | 200 | 3.28 | 30.40 |
| 24 | 70 | 3.29 | 15 |
| 15.20 | 327 | 4.24 | 55.80 |
| 19.80 | 202 | 3.40 | 28.30 |
Use a pair plot / scatter matrix when…
- Exploratory data analysis with 3-8 variables
- Feature selection
- Looking for patterns
Avoid when…
- More than 8 variables (too many panels)
- Reporting (too complex)
Data it needs
| Property | Value |
|---|---|
| Min Rows | 10 |
| Min Columns | 3 |
| Column Types | numbernumbernumber |
Visual anatomy
Marks
circle
Channels
position-xposition-y
Axes
one variable per row, repeated as column
Guiding principles
Consider instead
Common mistakes
Too many variables makes the matrix unreadable
Inconsistent scales across panels
History
Introduced by Hartigan (1975), popularized by the seaborn Python library.
Accessibility notes
Provide correlation summary table. Describe strongest relationships.
Related reading
Got data? Let's see what works.
Drop your CSV. You'll get a Pair Plot / Scatter Matrix plus four alternatives - ranked by which one actually fits your data best.