Pair Plot
A pair plot (or scatterplot matrix) plots every numeric variable in a dataset against every other one, arranged in a grid - giving a fast, comprehensive first look at relationships across an entire dataset during exploratory data analysis.
What a Pair Plot Shows
- Off-diagonal cells - scatter plots between each pair of variables
- Diagonal cells - a histogram or density plot of each individual variable
- Hue grouping - color-coding points by a categorical column to reveal class separation
Plotting with Seaborn
import seaborn as sns
sns.pairplot(df, hue="species")
Why Use It During EDA
Instead of manually creating a scatter plot for every combination of columns, a pair plot generates them all in one call - making it one of the fastest ways to spot correlated variables, clusters, and potential outliers before deeper analysis.
Pair plots become cluttered and slow with a large number of columns - it's common practice to first narrow down to the most relevant numeric features before generating one.