figure图像
时间:2020-06-17 13:53:26
收藏:0
阅读:63
import numpy from matplotlib import pyplot x=numpy.linspace(-3,3,50) y1=2*x+1 y2=x**2 #创建第一个画布 pyplot.figure() pyplot.plot(x,y1) #创减第二个画布 pyplot.figure(num=‘第一幅图‘,figsize=(5,5)) pyplot.plot(x,y2) pyplot.plot(x,y1,color=‘red‘,linewidth=1,linestyle=‘--‘) pyplot.show()
原文:https://www.cnblogs.com/luckiness/p/13152047.html
评论(0)