From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Demo, part 2 - Python Tutorial
From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson
Demo, part 2
Now that we have a good understanding of the basic functionality of Matplotlib, we can see how we can use it to generate more sophisticated types of plots like bubble plots. So we're going to start by loading some data from gapminder.org using Pandas. So for this, we're just going to do pd.readcsv data gapminder.csv, and we're going to define a couple of useful arrays, one of colors, and one of continents. We can take a look at the data, and essentially what we have are five different columns, one with the country, one with GDP, population, life expectancy, and the corresponding continent that that country is located in. The continent is given by numerical ID, so zero is Africa, one is Americas, etc. What we're going to do is we're going to plot all of this data into a single chart using all the tools we learned so far. We're going to do this by encoding this information in multiple ways into the plot. In particular, we're going to set the GDP to be along the x-axis, the life…
Contents
-
-
-
-
-
-
(Locked)
Topics33s
-
(Locked)
Fundamental components of a Matplotlib plot5m 33s
-
(Locked)
Explore the Matplotlib API8m 14s
-
(Locked)
Demo, part 122m 42s
-
(Locked)
Demo, part 221m 33s
-
(Locked)
Demo, part 325m 58s
-
(Locked)
Stylesheets4m 39s
-
(Locked)
Demo8m 26s
-
(Locked)
Mapping10m 21s
-
(Locked)
Demo24m 9s
-
(Locked)
-
-
-
-
-
-