changeset 18889:b6fdfe22634b

legend.m: Make demos using 'location' property compatible with Matlab. * legend.m: Use 'location' property in a Matlab compatible way in %!demo block so that output can be compared with Octave.
author Rik <rik@octave.org>
date Thu, 03 Jul 2014 08:46:19 -0700
parents 962db83e36c3
children f1e21a495e20
files scripts/plot/appearance/legend.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Wed Jul 02 08:56:40 2014 -0700
+++ b/scripts/plot/appearance/legend.m	Thu Jul 03 08:46:19 2014 -0700
@@ -1248,7 +1248,7 @@
 %! plot (rand (2));
 %! title ('legend called with cellstr and string inputs for labels');
 %! h = legend ({'foo'}, 'bar');
-%! legend location northeastoutside
+%! legend (h, 'location', 'northeastoutside');
 %! set (h, 'fontsize', 20);
 
 %!demo
@@ -1261,9 +1261,9 @@
 %! clf;
 %! x = 0:1;
 %! plot (x,x,';I am Blue;', x,2*x, x,3*x,';I am Red;');
-%! legend location northeastoutside
+%! h = legend ('location', 'northeastoutside');
 %! ## Placing legend inside should return axes to original size
-%! legend location northeast
+%! legend (h, 'location', 'northeast');
 %! title ('Blue and Red keys, with Green missing');
 
 %!demo