...

Library - Matplotlib

Back to Course

Lesson Description


Lession - #503 matplotlib Plotting


Plotting x and y focuses

The plot(>
work is utilized to draw focuses (markers>
in an outline.

As a matter of course, the plot(>
work defines a boundary from one highlight another.

The capacity takes boundaries for determining focuses in the outline.

Boundary 1 is an exhibit containing the focuses on the x-hub.

Boundary 2 is an exhibit containing the focuses on the y-hub.

In the event that we really want to plot a line from (1, 3>
to (8, 10>
, we need to pass two clusters [1, 8] and [3, 10] to the plot work.

Example

    import matplotlib.pyplot as plt
import numpy as np

xpoints = np.array([1, 8]>
ypoints = np.array([3, 10]>
plt.plot(xpoints, ypoints>
plt.show(>