octave-maintainers
[Top][All Lists]
Advanced

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

Re: plotyy problems and change proposal


From: Michael Goffioul
Subject: Re: plotyy problems and change proposal
Date: Mon, 3 Dec 2007 10:07:52 +0100

On 12/2/07, David Bateman <address@hidden> wrote:
> What I meant is that there is nothing to stop you changing the
> properties of one of the axis objects and that without listeners there
> is no way to get these changes automatically reflected in the second set
> of axis. In fact its probably better for the gnuplot code to calculate
> the size of the axis automatically for first axis and use that to force
> the size of the second axis..

You can also screw up the plot in Matlab:

h = plotyy(1:10, rand(1,10), 1:10, rand(1,10))
set(h(1), 'position', [0.5 0.5 0.4 0.4])

There's no listener on the position property. However, both axes are given
the same position in normalized units (not the outerposition). This means
that when resizing the figure window, the axes will still be aligned; no
listener is needed.

> Alright, then what about the attached. Does this do what you want?

This looks good. Although I would avoid hardcoding twice the axes position
and use something like set(ax(2), 'position', get(ax(1), 'position')).

Michael.


reply via email to

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