On Thu, Apr 26, 2012 at 12:51 PM, willfurnass <email@example.com>
I've converted a simple MATLAB script  for wavelet decomposition-based
analysis to Python. I now want to create figures similar to  that
feature five subplots in one column, with the 1st and 3rd being generated
using 'subplot.plot' and the others being generated using 'subplot.imshow'.
I want to find a way of scaling the x and y axes of all subplots so that
they're the same size on screen across all subplots. Unfortunately I can't
find any combination of 'aspect' or 'extent' that will let me do this. I
should note that I've added colorbars to all my image plots; the problem
exists regardless of whether these are used.
Has anyone got any suggestions? Apologies if this is a trivial matter; I'm
fairly new to MP.
FYI I'm using matplotlib v1.1.0.
You could try
fig, axes = plt.subplots(nrows=5, sharex=True, sharey=True)
And then call `axes.plot(...)` and `axes.imshow(...)`. You could also unpack the axes array and access them that way (if you prefer):
ax0, ax1, ax2, ax3, ax4 = axes