liming19680104

画多个图:

复制代码
import numpy as np
import matplotlib.pyplot as plt

#解决能显示中文
plt.rcParams[\'font.sans-serif\']=[\'SimHei\'] #指定默认字体 SimHei为黑体
plt.rcParams[\'axes.unicode_minus\']=False #用来正常显示负号

x=np.arange(0,10,1)
fig=plt.figure()  #定义第一个图纸
ax1 = fig.add_subplot(1,1,1)
ax1.plot(x,x)

fig2=plt.figure()  #定义第二个图纸
ax2 = fig2.add_subplot(1,1,1)
ax2.plot(x,-x)

plt.show()
复制代码

 

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2021-07-17
  • 2021-04-29
  • 2021-12-16
  • 2021-12-06
  • 2021-05-12
  • 2021-10-18
猜你喜欢
  • 2021-10-18
  • 2021-10-08
  • 2021-08-05
  • 2021-07-22
  • 2022-02-07
  • 2021-10-13
相关资源
相似解决方案