Nested Subplots?

Is it possible to have nested subplots?

I would like to have 2 rows....with the top row having two columns and
the bottom row having one column.

For the bottom plot, I'd like to be able to choose between the following:
  1) The size of the bottom plot expands to fill the entire horizontal space.
  2) The size of the bottom plot is unchanged (same as the other two
plots) and is simply centered in the bottom row.

x x
  x

Thanks.

1) is easy:

  subplot(221)
  subplot(222)
  subplot(212)

2) requires you to use axes rather than subplot. The syntax is
axes([left, bottom, width, height])

  ax1 = subplot(221)
  ax2 = subplot(222)
  l,b,w,h = ax1.get_position()
  ax3 = axes([0.5-w/2., 0.1, w, h])

···

On Dec 4, 2007 12:19 PM, Tom Johnson <tjhnson@...287...> wrote:

Is it possible to have nested subplots?

I would like to have 2 rows....with the top row having two columns and
the bottom row having one column.

For the bottom plot, I'd like to be able to choose between the following:
  1) The size of the bottom plot expands to fill the entire horizontal space.
  2) The size of the bottom plot is unchanged (same as the other two
plots) and is simply centered in the bottom row.

It sure is!

For the top too you need
   subplot(2,2,1) and subplot(2,2,2)

For the bottom plot
   subplot(2,1,2)

They key to remember is the numrows x numcols defines the grid
and the plot number defines where the plot goes in the grid. This
is a tricky bit to wrap your head around initially but once you
get it, its a very powerful way of specifies plots with just 3
bits of info.

Shannon

···

----------------
Shannon Jaeger
Physics & Asronomy Dept.
University of Calgary

On Tue, December 4, 2007 11:19 am, Tom Johnson said:

Is it possible to have nested subplots?

I would like to have 2 rows....with the top row having two columns and
the bottom row having one column.

For the bottom plot, I'd like to be able to choose between the following:
  1) The size of the bottom plot expands to fill the entire horizontal
space.
  2) The size of the bottom plot is unchanged (same as the other two
plots) and is simply centered in the bottom row.

x x
  x

Thanks.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options