2022
05-15
05-15
Python的Matplotlib库图像复现学习
目录总结frompylabimport*n=256X=np.linspace(-np.pi,np.pi,n,endpoint=True)Y=np.sin(2*X)plt.axes([0.025,0.025,0.95,0.95])plt.plot(X,Y+1,color='blue',alpha=1.00)plt.fill_between(X,1,Y+1,color='b',alpha=.25)plt.plot(X,Y-1,color='blue',alpha=1.00)plt.fill_between(X,-1,Y-1,(Y-1)>-1,color='b',alpha=.25)plt.fill_between(X,-1,Y-1,(Y-1)<-1,color='r',alpha=.25)plt.xticks([])plt.yticks([])plt....
继续阅读 >