When you say "own axes", I presume you're using subplots.
You need to create your axes with different sizes (subplot creates
axes with same size), so that the height of images are equal when they
shrink to to fit in the axes box. You may create an axes with a given
size with following command

fig.add_axes([0.2, 0.08, 0.6, 0.04])

where the input list specifies the position of the axes in the
normalized figure coordinate.
But you need to manually calculate the correct axes position.

In the example directory of the mpl svn, there are little helper
classes I wrote (axes_grid.py, axes_divider.py).
The link below shows a little example how you can use them.

http://abitofpythonabitofastronomy.blogspot.com/2009/02/images-side-by-side-in-mpl.html

-JJ



On Tue, Feb 17, 2009 at 9:43 AM, Eric Jonas <jo...@mit.edu> wrote:
> I searched for a considerable amount of time this weekend, but have yet
> to figure out how to do the following:
>
> I want to plot several M_i x N images side-by-side on a figure. In
> particular, something like follows:
>
>
> |-----------------|   |--------|     |---|
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> |                 |   |        |     |   |
> -------------------   ----------     -----
>
> That is, while each image has the same height, the widths
> (in pixel values) are different. At the moment, I am plotting
> each image in its own axes, but the problem appears to be that
> the "fatter" image is being scaled down to the point
> of being too small (and so that all subfigure sections are roughly the
> same size).
>
> I want each image to eventually have independent sets of labels
> along the X axis, so I can't just combine them all into one big image.
> Might anyone have any idea how to pull this off?
>                        ...Eric
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to