help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lining up the axes of multiplots/subplots


From: Joseph Wakeling
Subject: Lining up the axes of multiplots/subplots
Date: Fri, 17 Nov 2006 14:35:05 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060918)

Hello,

I'm hoping someone can give me some advice on multiplot(), subplot() and
related commands.  I've played around with them a bit but not had
success in achieving what I want.

Here's the aim: two plots, one above the other, sharing the same X
scale.  The X axes must line up together.

I want to plot several data sets in the first plot, and some different
ones in the second.

Now, I can do ...

#first
subplot(2,1,1)
plot(x1,y1)
hold on
plot(x2,y2)
#etc
hold off

#then
subplot(2,1,2)
plot(a1,b1)
hold on
plot(a2,b2)
#etc
hold off

... to get the plots one above the other, but this doesn't do anything
to align the axes.  What commands do I have to use to achieve this?

Two related issues would be (a) the same, but side-by-side and sharing
the same Y scale, and (b) overplotted graphs, where e.g. the X scale is
the same but there are two different Y scales on the left and right Y axes.

Can anyone advise?

Many thanks,

    -- Joe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]