Plotting Sin and Cos Waves
Learn how to plot sin and cos waves using matplotlib in Python.
We'll cover the following...
Introduction to Matplotlib
Matplotlib is a visualization library in Python for plotting 2D array plots. It is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. It can be used to plot all sorts of graphs like line, bar, scatter, histogram, and so on.
We’ll import Matplotlib into our code like so:
from matplotlib import pyplot as plt
or
import matplotlib.pyplot as plt
The new thing here is: import matplotlib.pyplot as plt
. We are importing it as ...