Concept

Line Graphs

To create a line graph, use plt.plot() plt.plot() does not require any arguments, and thus will show a blank graph if used without arguments. Commonly, they are given the inputs horizontal / vertical coordinates of the data points and perhaps a third argument to specify the format.

x = [1, 2, 3] y = np.array([[1, 2], [3, 4], [5, 6]]) plt.plot(x, y)

results in the graph

Image 0

0

1

Updated 2021-05-08

Tags

Data Science

Related