I am trying to make a plot of subplots where each subplot comprises out of two subplots sharing the x-axis. I have tried the following code:
gs_top = plt.GridSpec(6, 3, hspace = 0.0001)
gs_base = plt.GridSpec(6, 3, hspace = 0.95)
f2 = plt.figure()
for i in range(9):
up_id = [0,1,2,6,7,8,12,13,15]
bot_id = [3,4,5,9,10,11,15,16,17]
axarr2 = f2.add_subplot(gs_top[up_id[i]])
axarr2.plot()
ax_sub = f2.add_subplot(gs_base[bot_id[i]], sharex= axarr2)
ax_sub.imshow()
axarr2.set_title('title')
axarr2.xaxis.set_visible(False)
How should I set the parameters in plt.GridSpec()?
