I am working with matplotlib subplots. This is the skeleton of my code:
import matplotlib.pyplot as plt
from matplotlib import gridspec
plt.close('all')
f, axarr = plt.subplots(2, sharex=True,)
gs = gridspec.GridSpec(2, 1, height_ratios=[3, 1])
axarr[0] = plt.subplot(gs[0])
axarr[1] = plt.subplot(gs[1])
axarr[0].set_ylim([-10,10])
axarr[1].set_ylim([-1,1])
plt.tight_layout()
f.subplots_adjust(hspace=0)
plt.show()
This is the output that I get from this code.
As one can see, in the left y-axis, I get ytick labels which overlap on top of each other and 'weird' y-axis tick labels (0) in the y-axis on the right hand side. How can I solve this? I will be thankful to have help here.