# subplot inside subplot

Hi All
I have a figure of six subplot. I want to make one subplot in such a way that I have to plot two data set with common x-axis with the bottom plot is 30% of the subplot and the upper plot is 70% of the subplot. How can I do that? I tried

x = arange(10)
y=sin(x)
z=cos(y)
rect1 = [0.1, 0.1, 0.8, 0.2]
rect2 = [0.1, 0.3, 0.8, 0.5]
axUpper=axes(rect2)
axLower=axes(rect1)
axUpper.plot(x,y)
axLower.plot(x,z)

But how can I do this in a subplot?

Thanks
Vinu V

···

VINU VIKRAM
http://iucaa.ernet.in/~vvinuv/

You can do this with 'axes', but not with 'subplot'. subplot is just
a special case of axes where the assumption is that the axes lie on a
regular grid.

JDH

···

On Feb 6, 2008 7:51 AM, Vinu Vikram <vvinuv@...287...> wrote:

Hi All
I have a figure of six subplot. I want to make one subplot in such a way
that I have to plot two data set with common x-axis with the bottom plot is
30% of the subplot and the upper plot is 70% of the subplot. How can I do
that? I tried

x = arange(10)
y=sin(x)
z=cos(y)
rect1 = [0.1, 0.1, 0.8, 0.2]
rect2 = [0.1, 0.3, 0.8, 0.5]
axUpper=axes(rect2)
axLower=axes(rect1)
axUpper.plot(x,y)
axLower.plot(x,z)

But how can I do this in a subplot?