[Matplotlib-users] Adjusting the size of a subplot

You are looking for matplotlib.axes.Subplot.set_position

That will work, but what you are really looking for is to not use
subplot at all, but rather axes; a Subplot is just an Axes that happens
to lie on a regular grid

  axes_top = fig.add_axes([0.1, 0.3, 0.8, 0.6])
  axes_bottom = fig.add_axes([0.1, 0.1, 0.8, 0.15])

If you want the two axes to touch and share and xaxis, see
examples/ganged_plots.py. There are nice tricks you can do to share
an xaxis so for example when you pan/zoom in one the xaxis in both
plots move together; see examples/shared_axis_demo.py

JDH