Python数据可视化---折线图(matplotlib+numpy)

import matplotlib.pyplot as plt import numpy as np #生成一系列数据 x=np.linspace(-1,1,50) y1=x**2 y2=2*x+1 ''' plt.figure() #宣告如下描述均为此图 #若是figure()参数省略,按12345排列,加参数以后,图标为figure num plt.plot(x,y1) plt.show
相关文章
相关标签/搜索