octave-maintainers
[Top][All Lists]
Advanced

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

Re: pbaspect() and legend


From: Rik
Subject: Re: pbaspect() and legend
Date: Tue, 28 Jan 2020 10:25:39 -0800

On 01/28/2020 09:55 AM, address@hidden wrote:
Subject:
Re: pbaspect() and legend
From:
José Luis García Pallero <address@hidden>
Date:
01/28/2020 09:26 AM
To:
Rik <address@hidden>
CC:
Octave Maintainers <address@hidden>
List-Post:
<mailto:address@hidden>
Precedence:
list
MIME-Version:
1.0
References:
<address@hidden> <MTAwMDAwNy5ub21hZA.1580231620@quikprotect>
In-Reply-To:
<MTAwMDAwNy5ub21hZA.1580231620@quikprotect>
Message-ID:
<CAFemY3ZvourdyMHcC8CTpHNrqeJsH2_oX3vJNn_rgv5dR7xv=address@hidden>
Content-Type:
multipart/alternative; boundary="000000000000bfd687059d36894d"
Message:
2



El mar., 28 ene. 2020 a las 18:13, Rik (<address@hidden>) escribió:
On 01/28/2020 09:00 AM, address@hidden wrote:
Subject:
pbaspect() and legend
From:
José Luis García Pallero <address@hidden>
Date:
01/28/2020 08:12 AM
To:
Octave Maintainers <address@hidden>
List-Post:
<mailto:address@hidden>
Content-Transfer-Encoding:
quoted-printable
Precedence:
list
MIME-Version:
1.0
Message-ID:
<CAFemY3bNeWcJE_kccUNG64XT7=address@hidden>
Content-Type:
text/plain; charset="UTF-8"
Message:
4

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]);
print('check_pbaspect.png','-dpng');
I can reproduce this.  Can you file a bug report?

Done

Not ideal, but in the meantime you can work around this by manually changing the position of the legend object.

hl = legend ();  # get handle to legend object
pos = get (hl, "position");
... modify pos variable ...
set (hl, "position", pos)

This should work if you absolutely need to produce a figure for publication immediately.

--Rik

reply via email to

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