Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python plot two lines on same graph

import matplotlib.pylot as plt
x_coordinates = [1, 2, 3]

y1_coordinates = [1, 2, 3]
y2_coordinates = [3, 4, 5]

fig = plt.figure(1)
plt.plot(x_coordinates, y1_coordinates) # plot first line
plt.plot(x_coordinates, y2_coordinates) # plot second line
plt.show()
 
PREVIOUS NEXT
Tagged: #python #plot #lines #graph
ADD COMMENT
Topic
Name
8+2 =