diff scripts/plot/appearance/legend.m @ 22151:283d8dfcad37

Make demos Matlab compatible for comparison with dump_demos script. * brighten.m, colorcube.m: Replace 'tic' option to axis with setting properties on gca. * axis.m: Use 'origin', rather than 'zero', for xaxislocation, yaxislocation demos. * datetick.m: Fix typo '2' -> 'ax'. * legend.m: Use labels with call to legend() rather than embedding labels in call to plot. * text.m, xlim.m, ylim.m, zlim.m: Remove asserts from demo blocks. * isonormals.m: Use Matlab syntax in string definitions. * light.m: Use space between function name and opening parenthesis in demos. Add missing semicolon at end of lines. * dump_demos.m: Add helper functions sombrero() and rgbplot() to script so that demos will run cleanly in Matlab.
author Rik <rik@octave.org>
date Wed, 20 Jul 2016 08:54:51 -0700
parents 9121d6584f6a
children 1c4cd12987f5
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Wed Jul 20 15:32:53 2016 +0100
+++ b/scripts/plot/appearance/legend.m	Wed Jul 20 08:54:51 2016 -0700
@@ -1311,12 +1311,10 @@
 %!demo
 %! clf;
 %! x = 0:1;
-%! plot (x, x, ';\alpha;',  ...
-%!       x, 2*x, ';\beta=2\alpha;',  ...
-%!       x, 3*x, ';\gamma=3\alpha;');
-%! h = legend ();
+%! plot (x,x,  x,2*x, x,3*x);
+%! title ('Labels with interpreted Greek text');
+%! h = legend ('\alpha', '\beta=2\alpha', '\gamma=3\alpha');
 %! set (h, 'interpreter', 'tex');
-%! title ('Labels with interpreted Greek text');
 
 %!demo
 %! clf;
@@ -1384,7 +1382,7 @@
 %! rand_2x3_data2 = [0.44804, 0.84368, 0.23012; 0.72311, 0.58335, 0.90531];
 %! bar (rand_2x3_data2);
 %! ylim ([0 1.2]);
-%! title ('"left" option places text label west of colors');
+%! title ('"left" option places colors to the left of text label');
 %! legend ('1st Bar', '2nd Bar', '3rd Bar');
 %! legend left;