- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 54字
- 2025-04-04 16:06:36
Getting ready
We will consider an example of the number of batteries sold in each year, with different ampere hour (Ah) ratings. There are two categorical variables: year and Ah ratings, and one numeric variable: the number of batteries sold.
Import the required libraries:
import numpy as np
import matplotlib.pyplot as plt