plt.subplot(2, 1, 1) plot_hist(a) plt.title(a_label) plt.subplot(2, 1, 2) plot_hist(b) plt.title(b_label) plt.tight_layout()