August 2017
Beginner to intermediate
334 pages
8h 22m
English
Each style, including the default one, contains a list of colors called the color cycle. By default, one color is used at a time in the order of the cycle before the cycle is reset when we display the figure using pyplot.show(). You can choose a specific color in the current color cycle with C0, C1, C6, and so on. Here is a quick example:
import matplotlib.pyplot as plt# Global smartphone sales by operating system in 2009-2016 (in Millions)# Data were collected from Statista# https://www.statista.com/statistics/263445/global-smartphone-sales-by-operating-system-since-2009/# Data were published by Gartner in Feb 2017years = list(range(2009,2017))android = [6.8,67.22,220.67,451.62,761.29,1004.68,1160.21,1271.02] ...
Read now
Unlock full access