octave-maintainers
[Top][All Lists]
Advanced

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

Re: pbaspect() and legend


From: Nicholas Jankowski
Subject: Re: pbaspect() and legend
Date: Tue, 28 Jan 2020 12:59:35 -0500

On Tue, Jan 28, 2020 at 12:55 PM Nicholas Jankowski <address@hidden> wrote:
>
> On Tue, Jan 28, 2020 at 11:13 AM José Luis García Pallero
> <address@hidden> wrote:
> >
> > Hello:
> >
> > I need to use the pbaspect() function in order to customize a figure
> > aspect ratio. All works perfect except the legend, which is not
> > maintained inside the plot box after the pbaspect() call. But in
> > Matlab the legend is affected by the function. Is it a bug in the
> > Octave pbaspect()?
> >
> > I'm using this script:
> >
> > plot(rand(3));
> > legend('First','Second','Third');
> > pbaspect([2 1 1]);
> >
>
>
> I can confirm this behavior appears to be a noncompatibility bug in
> Octave.  Testing in Octave and Matlab 2019a, I get the two attached
> different figures (appears the same both on screen and in the
> generated png)

playing with this a bit further, I notice that it makes no difference
if I switch the order of the legend and pbaspect calls. Also in matlab
the legend appears to stay pinned to the plot (say, if I resize the
figure window, legend stays in the upper right of the plot), whereas
in octave the legend seems to want to stay pinned to the window, and
will move in or out of the plot pane as necessary to maintain window
position.



reply via email to

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