[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44829] Multiple legends not working anymore w
From: |
Mattias Linde |
Subject: |
[Octave-bug-tracker] [bug #44829] Multiple legends not working anymore with plotyy |
Date: |
Tue, 14 Apr 2015 08:15:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 |
URL:
<http://savannah.gnu.org/bugs/?44829>
Summary: Multiple legends not working anymore with plotyy
Project: GNU Octave
Submitted by: linde
Submitted on: Tue 14 Apr 2015 08:15:11 AM GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.1
Operating System: GNU/Linux
_______________________________________________________
Details:
I have an old script that used to work in octave 3.2 which I've simplified as
far as possible:
figure(1);
clf
N = 10;
[ax,h1,h2] = plotyy( 1:N, rand(1,N), 1:N, rand(1,N), @plot, @plot );
axes(ax(1)) % Should not be needed
legend( ax(1), 'values1', 'Location', 'northwest');
axes(ax(2))
legend( ax(2), 'values2', 'Location', 'northeast');
set(ax(1), 'color', 'none')
set(ax(2), 'color', 'none')
Tested today with 3.2.4 and it works.
This no longer works in version 3.6.2 or 3.8.1 or the latest dev sources.
The version I built this morning says 4.0.0-rc3
I only get one legend and not two as I expect.
Did most testing in 3.8.1 and changing to gnuplot for toolkit instead of fltk
had no effect.
It does work in matlab 2014b.
As a workaround, I tried to create two axes myself instead of using plotyy and
do the same thing.
The second code snippet works in 3.6 and 3.8 as well as matlab. Have not
tested in 3.2.
Code:
figure(2);
clf
N = 10;
h1 = plot(1:N, rand(1,N), 'r');
a1 = gca();
a2 = axes();
h2 = plot(a2, 1:N, rand(1,N),'g');
% I know I haven't positioned a2 to the right as the first example will do
automatically
legend(a1, 'first', 'Location', 'northwest');
legend(a2, 'second', 'Location', 'northeast')
set(a1, 'color', 'none')
set(a2, 'color', 'none')
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44829>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #44829] Multiple legends not working anymore with plotyy,
Mattias Linde <=