Hello,

You may wish to check out pcolor() and/or pcolormesh() as they allow you to specify the coordinate system.

As for how to space the plots better, there are some options.  The one trick that I know of is to specify that you are using 3 rows when plotting the first two subplots, but then say that you are using 2 rows when plotting the last plot (or something like that).  There is also AxesGrid, but I haven't tried using it to do what you are thinking.

Ben Root

2010/5/28 Thøger Emil Juul Thorsen <thoeger@fys.ku.dk>
Hello SciPy list;

For my thesis I have an image which is also a spectrum of an object. I
want to plot the image using imshow along with a data plot of the
intensity, as can be seen on http://yfrog.com/0tforscipylistp .

My questions are 2:

1) imshow() sets the ticks on the two upper subplots as pixels
coordinates. What I want to show as tick labels on my x-axis is the
wavelength coordinates of the lower plot on the upper images (since
there is a straightforward pixel-to-wavelength conversion). I have
googled everywhere but can't seem to find a solution, is it possible?

2) Is there any possible way to make the subplots layout look a bit
nicer? Ideally to squeeze the two upper plots closer together and
stretch the lower plot vertically, or at least to make the two upper
subplots take up an equal amount of space?

Best regards;

Emil, python-newb and (former) IDL-user,
Master student of Astrophysics at the University of Copenhagen,
Niels Bohr Instutute.


_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user