这一篇讲的比较详细. 

http://matplotlib.org/examples/pylab_examples/subplots_demo.html

 

官方文档给出的subplots用法, 

http://matplotlib.org/api/pyplot_api.html

其中设置子图大小,  参数参见下面代码

 
import matplotlib.pyplot as plt

tPlot, axes = plt.subplots(
        nrows=4, ncols=1, sharex=True, sharey=False, 
        gridspec_kw={'height_ratios':[2,2,1,1]}
        )

tPlot.suptitle('node', fontsize=20)

axes[0].plot(range(10),'ro-') 
axes[1].plot(range(10),'bo-') 
axes[2].plot(range(10),'go-') 
axes[3].plot(range(10),'mo-') 

plt.show()

 

相关文章:

  • 2021-07-11
  • 2022-12-23
  • 2021-08-02
  • 2021-05-30
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-18
  • 2021-04-01
  • 2021-09-25
  • 2022-12-23
  • 2021-08-30
相关资源
相似解决方案