文章目录 一、subplot多合一显示 二、subplot分格显示 方法一:subplot2grid 方法二:gridspec 方法三:定义简单结构 一、subplot多合一显示 代码如下: import matplotlib.pyplot as plt plt.figure() plt.subplot(2, 1, 1) # 两行一列 位置一 plt.plot([0, 1], [0, 1]) plt.subplot(2, 3, 4) # 两行三列 位置四 plt.plot([0, 1], [0, 2]) plt.subplot(2, 3, 5) # 两行三列 位置五 plt.plot([0, 1], [0, 3]) plt.subplot(2,<