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.uj5u.com/houduan/125470.html
標籤:Python
