How can I add space below each subplot?

40 Views Asked by At

I'm looking to output a figure with 3 subplots on it, and include some relevant text below each subplot. I'm having trouble spacing my subplots appropriately.

I've tried:

gs = gridspec.GridSpec(6, 1, height_ratios=[1, 0.2, 1, 0.2, 1, 0.2])
ax1 = fig.add_subplot(gs[0])
ax2 = fig.add_subplot(gs[2])
ax3 = fig.add_subplot(gs[4])

It seems that Matplotlib ignores the 6th row because it is not assigned to a subplot. Therefore, there's space below the first 2 subplots, but not below the third.

I've also tried using plt.subplots_adjust() and adjusting hspace and bottom, to no avail.

I'm unclear on what the 'bottom' argument of GridSpec()/subplots_adjust() is controlling. I'd appreciate clarification.

0

There are 0 best solutions below