Hi,

Sorry if I'm just being thick .. I read through several of the
examples, and didn't figure it out.  I can figure out how to use
figsize to set the size of the entire figure, but I want several
subplots on one figure.  Maybe you can help me fix some sample code.
This plots a matrix and sqrt(x)/2.  I'd like to have the matrix show
up as a square while sqrt(x)/2 shows up as a rectangle.  The call to
axis('scaled') makes my matrix show up as square, but I'd like it to
be stretched out so that it uses up all of the horizontal space and
makes the figure taller.  That is, I want row 1 to be taller than row
2.

Thanks,

-Michael

#!/usr/bin/env python

from pylab import *
subplot(211)
mat = array([[1,2,3],[4,5,6],[7,8,9]])
pcolormesh(mat)
axis('scaled')

subplot(212)
dt = 0.001
t = arange(0.0, 10.0, dt)
root_t_over_2 = (t/2.0)**0.5
plot(t,root_t_over_2)

show()


On 3/21/07, Zack <[EMAIL PROTECTED]> wrote:
> Hi Michael,
>
> On 21 March 2007, Michael Lerner wrote:
>
> > so, I'm using subplot(311), subplot(312), subplot(313).  But, things
> > are getting resized so that each of the rows has the same height.
> > That really messes up the aspect ratio for my top row.
> >
> > I tried axis('equal') and axis('scaled') after making the first
> > subplot.  I do indeed get a good aspect ratio, but it shrinks things
> > to do this, rather than stretching things.  I'd really like the top
> > row to be taller than the bottom rows.  How can I do this?
>
> See the examples.
>
> You just have to set figure size you need.
>
> f = Figure(figsize=(5,4), dpi=100)
>
> --
> Zack
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


-- 
Biophysics Graduate Student
Carlson Lab, University of Michigan
http://www.umich.edu/~mlerner http://lernerclan.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to