[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Legend doesn't work?
From: |
John W. Eaton |
Subject: |
Legend doesn't work? |
Date: |
Sat, 24 Mar 2007 08:52:18 -0400 |
On 24-Mar-2007, Søren Hauberg wrote:
| I can't seem to get "legend" to work. The following code
|
| plot(rand(10,2))
| legend("hello", "world")
|
| only produces the word "world" on the plot. Am I using the function
| wrong or is it broken?
Please try the following patch.
Thanks,
jwe
scripts/ChangeLog:
2007-03-24 John W. Eaton <address@hidden>
* plot/legend.m: Correctly increment index into list of children..
Index: scripts/plot/legend.m
===================================================================
RCS file: /cvs/octave/scripts/plot/legend.m,v
retrieving revision 1.7
diff -u -u -r1.7 legend.m
--- scripts/plot/legend.m 23 Mar 2007 15:13:19 -0000 1.7
+++ scripts/plot/legend.m 24 Mar 2007 12:50:27 -0000
@@ -161,6 +161,7 @@
if (k <= nkids)
set (kids(k), "keylabel", arg);
turn_on_legend = true;
+ k++;
elseif (! warned)
warned = true;
warning ("legend: ignoring extra labels");