plb.plot(x,y,linestyle=’’,color=’’,linewidth=’’,alpha=’’)
linestyle: Set the line type , example linestyle=’–’、linestyle=’:’、linestyle=’-.’
linewidth: Set the line width , example linewidth=2
color: Line color ( English words or rgb Number set color , example color=‘red’)
alpha: Line transparency ,alpha stay 0-1 Choose between
x Coordinate range :plb.xlim(min,max)
y Coordinate range :plb.ylim(min,max)
sine :
import numpy as np
import matplotlib.pyplot as plb
x = np.linspace(-np.pi,np.pi,3000)
sinx = np.sin(x)
plb.plot(x,sinx)
plb.show()
cosine :
import numpy as np
import matplotlib.pyplot as plb
x = np.linspace(-np.pi,np.pi,3000)
cosx = np.cos(x)
plb.plot(x,cosx)
plb.show()