I have created a plot that contains two plots within the same axis similar to this: https://matplotlib.org/1.5.1/examples/pylab_examples/ganged_plots.html
fig = plt.figure()
ax1 = fig.add_axes([0.1, 0.5, 0.8, 0.4], xticklabels=[], ylim=(-1.2, 1.2))
ax2 = fig.add_axes([0.1, 0.1, 0.8, 0.4], ylim=(-1.2, 1.2))
x = np.linspace(0, 10)
ax1.plot(np.sin(x))
ax2.plot(np.cos(x))
Is there a way to change the size of the subplots when they are on the same axis? For example, right now the subplots are both equal in size, is there I can reduce the top plot to be only a quarter of the size?