Mercurial > hg > octave-nkf
diff scripts/plot/legend.m @ 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 | 984359717d71 |
children | 1ab3062df1ae |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -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