Python程序教程

您现在的位置是:首页 >  Python

当前栏目

python画图命令

python,画图,命令
2025-03-25 08:59:25 时间

大家好,又见面了,我是你们的朋友全栈君。

画两张图
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False #用来正常显示负号
plt.figure(1)
plt.plot(x_data,y_data,color="red",linewidth=2)
plt.title("原图")
plt.xlabel("x")
plt.ylabel("y")

plt.figure(2)
plt.plot(x_data,y_data,color="red",linewidth=2)
plt.title("原图")
plt.xlabel("x")
plt.ylabel("y")
plt.show()

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/144011.html原文链接:https://javaforall.cn