When I create a figure with shared axes, by default the tick labels go on the leftmost and bottom-most axes.
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(2,2, sharex=True)
ax[0,0].plot(np.arange(10))
ax[0,1].plot(np.arange(10))
ax[1,0].plot(np.arange(10))
ax[1,1].axis('off')
ax[0,0].set_ylabel('y1')
ax[1,0].set_ylabel('y2')
ax[1,0].set_xlabel('x1')
ax[0,1].set_xlabel('x2')
Now, suppose I turn off one of the axes that has tick labels (e.g. bottom-right). Is there a way to put the tick labels back onto the newly bottom-most axis? E.g. in this figure, I would like the tick labels to appear on ax[0,1]
right above the label x2