June 2016
Beginner to intermediate
304 pages
6h 24m
English
Let's see how to plot pie charts. This is useful when you want to visualize the percentages of a set of labels in a group.
import numpy as np import matplotlib.pyplot as plt
# Labels and corresponding values in counter clockwise direction
data = {'Apple': 26,
'Mango': 17,
'Pineapple': 21,
'Banana': 29,
'Strawberry': 11}# List of corresponding colors colors = ['orange', 'lightgreen', 'lightblue', 'gold', 'cyan']
0:# Needed if we want to highlight ...