Note

Go to the endto download the full example code.

Multiple lines using pyplot#

Plot three datasets with a single call toplot.

importmatplotlib.pyplotaspltimportnumpyasnp# evenly sampled time at 200ms intervalst=np.arange(0.,5.,0.2)# red dashes, blue squares and green trianglesplt.plot(t,t,'r--',t,t**2,'bs',t,t**3,'g^')plt.show()
pyplot three

References

The use of the following functions, methods, classes and modules is shownin this example:

Gallery generated by Sphinx-Gallery