[Top][All Lists]

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

Re: Lining up the axes of multiplots/subplots

From: Ron Crummett
Subject: Re: Lining up the axes of multiplots/subplots
Date: Fri, 17 Nov 2006 07:04:10 -0800
User-agent: Thunderbird (X11/20061025)

How about

axis([xmin xmax ymin ymax])

on each subplot? Just call it after each subplot. You can use this to align both x- and y-axes as you want. As far as plotting both plots in one window with one x-axis and different y-axes, Matlab has a plotyy command to do this. To my knowledge Octave does not yet have this but I am in the process of putting something similar together.


Joseph Wakeling wrote:

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 ...

hold on
hold off

hold on
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
Help-octave mailing list

reply via email to

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