I would like to make a 3 panel plot (three panels vertically stacked on top of each other), but with two x-axis labels, e.g. from here
The lower x-axis and top x-axis are applicable to the data in all three panels.
fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, sharex=True,
gridspec_kw={'height_ratios': [7,0, 7, 3]},
figsize=(14.0, 16.0))
with the top panel being
ax1. and ax2.
and
ax2 = ax1.twiny()
doesn't seem to work.