changeset 13936:bfaacd5e7379

Bug fix (#34901). Allow legend options to be specified. Modify demo.
author Ben Abbott <bpabbott@mac.com>
date Fri, 25 Nov 2011 23:44:44 -0500
parents e48e8253ce58
children 1ab3062df1ae
files scripts/plot/legend.m
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/legend.m	Fri Nov 25 17:09:19 2011 +0000
+++ b/scripts/plot/legend.m	Fri Nov 25 23:44:44 2011 -0500
@@ -403,7 +403,7 @@
               if (isfield (hgobj, "displayname")
                   && ! isempty (hgobj.displayname))
                 hplots = [hplots, hgkids(j)];
-                text_strings = {text_strings{:}, hbobj.displayname};
+                text_strings = {text_strings{:}, hgobj.displayname};
                 break;
               endif
             endfor
@@ -1083,7 +1083,7 @@
 %! clf
 %! rand_2x3_data1 = [0.341447, 0.171220, 0.284370; 0.039773, 0.731725, 0.779382];
 %! bar (rand_2x3_data1);
-%! ylim ([0 1.2]);
+%! ylim ([0 1.0]);
 %! legend ({"1st Bar", "2nd Bar", "3rd Bar"});
 
 %!demo
@@ -1092,6 +1092,7 @@
 %! bar (rand_2x3_data2);
 %! ylim ([0 1.2]);
 %! legend ("1st Bar", "2nd Bar", "3rd Bar");
+%! legend right
 
 %!demo
 %! clf