今天主要讲下一些参数的使用:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
X=np.linspace(-np.pi,np.pi,256,endpoint=True)
C,S = np.cos(X),np.sin(X)
plt.figure(figsize=(8,6),dpi=80)
plt.plot(X,C,color='blue',linewidth=3,linestyle='--')
plt.plot(X,S,color='green',linewidth=6,linestyle='-')
plt.xlim(-4,4)
plt.ylim(-1,1)
plt.xticks(np.linspace(-4,4,9,endpoint=True))
plt.yticks(np.linspace(-1,1,5,endpoint=True))