I have 3 subplots (3 rows and 1 column). We can use fig.subplots_adjust(hspace=0.2)
to adjust the distance between the subplots. this will change the distance between subplots for all case. How can I have different distance between plot 1 (311) & plot 2 (312), and plot 2 (312) & plot 3 (313)?
Good question. Try this:
from mpl_toolkits.axes_grid1 import make_axes_locatable
ax1 = plt.subplot2grid((1,1), (0,0))
divider = make_axes_locatable(ax1)
ax2 = divider.append_axes("bottom", size="100%", pad=0.5)
ax3 = divider.append_axes("bottom", size="100%", pad=1)
Then you would get:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With