Block 36: Seaborn: Scatter, Regression & Pair Plots
Visualize relationships between variables.
Concepts
- sns.scatterplot() with hue and size
- sns.regplot() for regression line
- sns.pairplot() for all-vs-all relationships
- sns.lmplot() for faceted regression
Code Examples
See exercise below.
Exercise
Scatter plot of sepal_length vs petal_length, colored by species. sns.pairplot on the full Iris dataset.
Homework
From pairplot, identify the two variables with the strongest visual correlation. Why? Thursday