matplotlib - Matplot multiple lines ploting in python -


everyone! need plot multiple lines using matplotlib (not necessarily) 4 arrays in single graph. code is

plt.plot(ptime,preactions,nytime,nyreactions,ltime,lreactions,sftime,sfreactions) plt.show()       

ptime , preactions name of arrays , on.
output of above code:

this output of above code

but don't want type of graph. want multiple lines representing different arrays (different data).
want results similar this:

i want results similar this

minimal working example:

import matplotlib.pyplot plt import numpy np  a=np.linspace(0, 1, 10) b=np.linspace(0, 2, 10) c=np.linspace(0, 3, 10) d=np.linspace(0, 4, 10)  plt.plot(b,a) plt.plot(c,a) plt.plot(d,a)  plt.show() 

gives you:

enter image description here


Comments

Popular posts from this blog

android - Automated my builds -

how to proxy from https to http with lighttpd -

python - Flask migration error -