Learn Before
Code
Using the plotting functions
After importing the pyplot and numpy module:
import matplotlib.pyplot as plt import numpy as np
We can create a figure with a single axes, and then plot data onto the axes
fig, ax = plt.subplots() ax.plot([1,2,3,4],[4,3,2,1])
The plotting functions expect a numpy array or a numpy masked array as input
0
2
Updated 2021-05-08
Tags
Data Science