2808 explained code solutions for 75 technologies


python-matplotlibHow to plot multiple lines on the same chart


In order to plot multiple lines, you simply call plot() method multiple times:

import matplotlib.pyplot as plt

plt.plot([1,4,2])
plt.plot([2,5,1])

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

.show()

render chart in a separate window