基本的用法: import matplotlib.pyplot as plt import numpy as np x=np.linspace(-1,1,50) #定义x:范围是(-1,1);个数是50 y=10*x+1 y2=