Note
Go to the endto download the full example code.
plot(x, y)#
Plot y versus x as lines and/or markers.
Seeplot.

importmatplotlib.pyplotaspltimportnumpyasnpplt.style.use('_mpl-gallery')# make datax=np.linspace(0,10,100)y=4+1*np.sin(2*x)x2=np.linspace(0,10,25)y2=4+1*np.sin(2*x2)# plotfig,ax=plt.subplots()ax.plot(x2,y2+2.5,'x',markeredgewidth=2)ax.plot(x,y,linewidth=2.0)ax.plot(x2,y2-2.5,'o-',linewidth=2)ax.set(xlim=(0,8),xticks=np.arange(1,8),ylim=(0,8),yticks=np.arange(1,8))plt.show()