If you've worked with the matplotlib data visualization library before, then you'll be familiar with the term figsize, which is measured in figure inches. These default to 6.4 inches in width by 4.8 inches in height. But, if you actually measured the physical screen inches on your monitor, you're likely to get different numbers. This post details why this mismatch exists and how to change the...
In this post, you'll learn about the different available matplotlib styles that can instantly change the appearance of the plot. Let's begin by making a simple line plot using the default style. This simple style is often the first (and sometimes only) style that many people encounter with matplotlib not realizing how easy it is to choose others.
import matplotlib.pyplot as plt import numpy as np x = np.arange(-2, 8, .1) y = .1 * x ** 3 - x ** 2 + 3 * x + 2 fig, ax...
Upon registration, you'll get access to the following free courses: