[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #66728] legend inconsistencies
From: |
Muhali |
Subject: |
[Octave-bug-tracker] [bug #66728] legend inconsistencies |
Date: |
Tue, 28 Jan 2025 12:54:04 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?66728>
Summary: legend inconsistencies
Group: GNU Octave
Submitter: muhali
Submitted: Tue 28 Jan 2025 09:54:01 AM PST
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 9.3.0
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 28 Jan 2025 09:54:01 AM PST By: Muhali <muhali>
The following code reveals multiple issues with the legend command:
col = {"r" "g" "b"} ;
for j = 1 : 3
if j < 2
ax(j) = subplot(4, 1, [1 2]) ;
else
ax(j) = subplot(4, 1, 1+j) ;
endif
h(j) = plot(randn(1, 5), col{j}) ;
endfor
hl = legend(h, {"rrrrr" "ggggg" "bbbbb"}, "location", "eastoutside") ;
First, it is not clear why axes #2 and #3 are indented (and #1 is not). Then
the legend command as used here is motivated by the help text 'legend (HOBJS,
...)', which is meant for the current axis but is not mentioned. The text
should obviously be legend (HAX, HOBJ, ...) which works.
Interestingly, Matlab plots the legend to axis #1. And if one does legend
(ax(2), h(1:2), ...) Matlab plots to legends to and indents axis #2, while
octave indents again #2 and #3.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66728>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [Octave-bug-tracker] [bug #66728] legend inconsistencies,
Muhali <=