From the course: Data Visualization with Matplotlib and Seaborn
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Solution walkthrough - Python Tutorial
From the course: Data Visualization with Matplotlib and Seaborn
Solution walkthrough
- [Instructor] All right, everybody, welcome back. Let's go ahead and take a look at our solutions. All right, so let's go ahead and import our libraries and read in our production dataset. And just as a reminder, our production dataset had years as rows and countries as columns. So if we wanted to change our RC parameters, one really nice way to do this is to create a dictionary of every parameter you want to change in a given family. So I've commented out some that I'm not actually changing, but just want to illustrate some of the options that you might play with, as well as how a dictionary might look. But we're going to change our top and right spines to be False. And then we use the rc function to specify the group of parameters we want to change and pass in the dictionary, modifying those axis settings. We'll then go ahead and do some data prep. So we needed a DataFrame that had Brazil versus the rest of the world. For our stack plot, we've already created this chart before…
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.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Intro to Matplotlib6m 39s
-
(Locked)
Plotting methods6m 56s
-
(Locked)
Plotting DataFrames5m 35s
-
(Locked)
Challenge: Plotting DataFrames3m 14s
-
(Locked)
Solution: Plotting DataFrames2m 26s
-
(Locked)
Anatomy of a Matplotlib figure4m 9s
-
(Locked)
Chart titles and font sizes9m 46s
-
(Locked)
Chart legends10m 21s
-
(Locked)
Line styles2m 54s
-
(Locked)
Axis limits5m 30s
-
(Locked)
Figure sizes5m 13s
-
(Locked)
Custom axis ticks4m 3s
-
(Locked)
Vertical lines6m 43s
-
(Locked)
Adding text4m 38s
-
(Locked)
Pro tip: Text annotations5m 18s
-
(Locked)
Removing borders5m 59s
-
(Locked)
Challenge: Formatting charts2m 7s
-
(Locked)
Solution: Formatting charts2m 55s
-
(Locked)
Line charts3m 30s
-
(Locked)
Stacked line charts6m 41s
-
(Locked)
Dual axis charts8m 51s
-
(Locked)
Challenge: Dual axis line charts1m 51s
-
(Locked)
Solution: Dual axis line charts2m 43s
-
(Locked)
Bar charts10m 19s
-
(Locked)
Challenge: Bar charts1m 23s
-
(Locked)
Solution: Bar charts2m 37s
-
(Locked)
Stacked bar charts5m 25s
-
(Locked)
Grouped bar charts7m 38s
-
(Locked)
Combo charts7m 56s
-
(Locked)
Challenge: Advanced bar charts1m 22s
-
(Locked)
Solution: Advanced bar charts2m 56s
-
(Locked)
Pie and donut charts10m 37s
-
(Locked)
Challenge: Pie and donut charts1m 15s
-
(Locked)
Solution: Pie and donut charts2m 2s
-
(Locked)
Scatterplots and bubble charts5m 13s
-
(Locked)
Histograms10m 10s
-
(Locked)
Challenge: Scatterplots and histograms1m 40s
-
(Locked)
Solution: Scatterplots and histograms2m 44s
-
(Locked)
Key takeaways2m 23s
-
(Locked)
-
-
(Locked)
Intro to advanced customization58s
-
(Locked)
Subplots9m 47s
-
(Locked)
Challenge: Subplots2m 12s
-
(Locked)
Solution: Subplots4m 45s
-
(Locked)
GridSpec6m 17s
-
(Locked)
Challenge: GridSpec2m 43s
-
(Locked)
Solution: GridSpec4m 10s
-
(Locked)
Color options3m 3s
-
(Locked)
Color palettes4m 50s
-
(Locked)
Challenge: Colors1m 53s
-
(Locked)
Solution: Colors1m 34s
-
(Locked)
Style sheets4m 19s
-
(Locked)
Challenge: Style sheets1m 9s
-
(Locked)
Solution: Style Sheets1m 11s
-
(Locked)
rcParams6m 57s
-
(Locked)
Saving figures and images2m 46s
-
(Locked)
Key takeaways48s
-
(Locked)
-
-
(Locked)
Intro to seaborn2m 58s
-
(Locked)
Basic formatting options5m 25s
-
(Locked)
Bar charts and histograms12m 2s
-
(Locked)
Challenge: Bar charts and histograms1m 48s
-
(Locked)
Solution: Bar charts and histograms4m 5s
-
(Locked)
Box and violin plots7m 31s
-
(Locked)
Challenge: Box and violin plots1m 15s
-
(Locked)
Solution: Box and violin plots4m 42s
-
(Locked)
Linear relationship charts10m 47s
-
(Locked)
Jointplots5m 32s
-
(Locked)
Pairplots6m 45s
-
(Locked)
Challenge: Linear relationship charts1m 17s
-
(Locked)
Solution: Linear relationship charts5m 32s
-
(Locked)
Heatmaps5m 37s
-
(Locked)
Challenge: Heatmaps1m 27s
-
(Locked)
Solution: Heatmaps3m 50s
-
(Locked)
FacetGrid5m 47s
-
(Locked)
Matplotlib integration3m 34s
-
(Locked)
Key takeaways1m 53s
-
(Locked)