...

Library - Matplotlib

Back to Course

Lesson Description


Lession - #502 matplotlib pyplot


Pyplot

The vast majority of the Matplotlib utilities lies under the pyplot submodule, and are normally imported under the plt nom de plume:

import matplotlib.pyplot as plt

Presently the Pyplot bundle can be alluded to as plt.

Model
Define a boundary in a graph from position (0,0>
to position (6,250>
:

    import matplotlib.pyplot as plt
import numpy as np

xpoints = np.array([0, 6]>
ypoints = np.array([0, 250]>
plt.plot(xpoints, ypoints>
plt.show(>