When I have connected plots, I like to set different xticks on each plot so that there isn't an overlap between the last tick on the first plot and the first tick on the last plot. Here's what I mean:
import numpy as np
from matplotlib import pyplot as plt
x_bounds = [0, 4]
x1_ticks = np.arange(4)
x2_ticks = np.arange(5)
y_bounds = [0, 8]
y1_ticks = np.arange(9)
y2_ticks = np.arange(8)
fig, ((ax11, ax12), (ax21, ax22)) = plt.subplots(2, 2, figsize = [8, 8], sharex = True, sharey = True)
fig.subplots_adjust(wspace=0)
fig.subplots_adjust(hspace=0)
ax11.plot(x, x)
ax12.plot(x, np.sqrt(x))
ax21.plot(x, x**2)
ax22.plot(x, np.exp(x))
ax21.set_xticks(x1_ticks)
ax22.set_xticks(x2_ticks)
ax11.set_yticks(y1_ticks)
ax21.set_yticks(y2_ticks)
ax21.set_xlim(x_bounds)
ax22.set_xlim(x_bounds)
ax11.set_ylim(y_bounds)
ax21.set_ylim(y_bounds)
However, clearly this didn't work. How can I fix this?