首页 > 其他分享 >02figure图像

02figure图像

时间:2023-01-31 20:46:42浏览次数:45  
标签:plot plt figure num 图像 y1 y2 02figure

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-1,1,50)
y1 = 2*x+1
y2 = x**2

plt.figure(num=1,figsize=(10,10))
plt.plot(x,y1)

plt.figure(num=2)
plt.plot(x,y2)
plt.plot(x,y1,color='red',linewidth=1.0,linestyle='--')
plt.show()

image-20230131162204006

image-20230131162216641

标签:plot,plt,figure,num,图像,y1,y2,02figure
From: https://www.cnblogs.com/lyc2001/p/17080699.html

相关文章