From the course: Data Visualization with Python in Excel
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Creating statistical plots with seaborn
From the course: Data Visualization with Python in Excel
Creating statistical plots with seaborn
- [Instructor] To build up your repertoire, we'll dive into more examples. You could follow along with the workbook, seaborn-statistical-plots, which includes the famous Palmer Penguins measurements. I've already read this dataset into Python as penguins_df. Let's start with one of my favorite Seaborne plots, the pairplot. We'll create this using the pairplot function, coloring by species with the hue parameter, and adding KDE plots along the diagonal. Adding a title here works a bit differently since the pairplot creates a figure with multiple plots. We'll add a main title to span the entire figure, and adjust it slightly upward using Y = 1.02 to prevent overlap. Think of a pairplot as a visual version of a correlation matrix. Along the diagonal, we see the distribution of each variable using a KDE plot. The other cells show scatter plots for all pairs in the dataset broken down by species, allowing us to compare and contrast different species while understanding the relationships…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.