matplotlib schared x axis code example Example: share x axis matplotlib fig=plt.figure() ax1 = plt.subplot(211) ax2 = plt.subplot(212, sharex = ax1)