[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32343] last plot resets all other curve label
From: |
David Bateman |
Subject: |
[Octave-bug-tracker] [bug #32343] last plot resets all other curve labels |
Date: |
Fri, 04 Feb 2011 22:58:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009091010 Iceweasel/3.0.14 (Debian-3.0.14-1) |
Follow-up Comment #5, bug #32343 (project octave):
John,
The listener functions are needed to allow things like
plot(1:2, "-r")
h = legend("I am red")
set (h, "location", "east")
to work as expected. I believe the issue is rather that in __plt__ we aren't
taking into account any existing legends when called. So the fix is to
correctly initialize hlgnd and tlgnd in __plt__. Ben's original fix worked for
#32022 because he explicitly set the correct axis handle and effectively
removed the call to fliplr.
Adding fliplr again works for #32343 because the second call to __plt__ and
the embedded second call to the legend function makes the "2" legend key be
assigned to the last key set. However this won't work for a case like
plot (1:3,"-r;1;");hold on; plot(2*(1:3),"-g;2;",3*(1:3),"-r;3;")
as the second and third labels will be reversed. Note that flipud and fliplr
shouldn't be needed at all.
I believe the attached changeset fixes this issue, but I haven't pushed it
yet.
D.
(file #22608)
_______________________________________________________
Additional Item Attachment:
File name: patch.legend Size:8 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32343>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Dmitri A. Sergatskov, 2011/02/03
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, John W. Eaton, 2011/02/03
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, John W. Eaton, 2011/02/03
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Ben Abbott, 2011/02/03
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, John W. Eaton, 2011/02/04
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels,
David Bateman <=
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, David Bateman, 2011/02/04
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, John W. Eaton, 2011/02/05
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, David Bateman, 2011/02/05
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Michael Godfrey, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Michael Godfrey, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Ben Abbott, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, David Bateman, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Ben Abbott, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Michael Godfrey, 2011/02/06
- [Octave-bug-tracker] [bug #32343] last plot resets all other curve labels, Ben Abbott, 2011/02/06