A pie plot is used to represent the contribution of various categories/groups to the total. For example, the contribution of each state to the national GDP, contribution of a movie to the total number of movies released in a year, student grades (A, B, C, D, and E) as a percentage of the total class size, or a distribution of monthly household expenditure on groceries, vegetables, utilities, apparel, education, healthcare, and so on.
Pie plot
Getting ready
Import the required library:
import matplotlib.pyplot as plt
How to do it...
The following code block plots a pie...