# HG changeset patch # User Andreas Weber # Date 1404042830 -7200 # Node ID cafffc1b70b1dd175bc6806408154989511baa4c # Parent 0075f3fba930f8ba6e495c96089ed82a70eb2d49 update plot demo blocks for compare_plot_demos * datetick.m, errorbar.m, plotyy.m, polar.m: Replace double with single quotes * printd.m: Use ... for continuation lines diff -r 0075f3fba930 -r cafffc1b70b1 scripts/plot/appearance/datetick.m --- a/scripts/plot/appearance/datetick.m Sun Jun 29 13:47:14 2014 +0200 +++ b/scripts/plot/appearance/datetick.m Sun Jun 29 13:53:50 2014 +0200 @@ -64,22 +64,22 @@ %! pop = [76.094, 92.407, 106.461, 123.077 131.954, 151.868, 179.979, ... %! 203.984, 227.225, 249.623, 282.224]; %! plot (datenum (yr, 1, 1), pop); -%! title ("US population (millions)"); -%! xlabel ("Year"); -%! datetick ("x", "YYYY"); +%! title ('US population (millions)'); +%! xlabel ('Year'); +%! datetick ('x', 'YYYY'); %!demo %! clf; %! yr = 1988:2:2002; %! yr = datenum (yr,1,1); %! pr = [12.1 13.3 12.6 13.1 13.3 14.1 14.4 15.2]; -%! plot (yr, pr, "-o"); -%! xlabel ("year"); -%! ylabel ("average price"); +%! plot (yr, pr, '-o'); +%! xlabel ('year'); +%! ylabel ('average price'); %! ax = gca; -%! set (ax, "xtick", datenum (1990:5:2005,1,1)); -%! datetick (2, "keepticks"); -%! set (ax, "ytick", 12:16); +%! set (ax, 'xtick', datenum (1990:5:2005,1,1)); +%! datetick (2, 'keepticks'); +%! set (ax, 'ytick', 12:16); ## Remove from test statistics. No real tests possible. %!assert (1) diff -r 0075f3fba930 -r cafffc1b70b1 scripts/plot/draw/errorbar.m --- a/scripts/plot/draw/errorbar.m Sun Jun 29 13:47:14 2014 +0200 +++ b/scripts/plot/draw/errorbar.m Sun Jun 29 13:53:50 2014 +0200 @@ -213,7 +213,7 @@ %! y1 = sin (x); %! y2 = cos (x); %! errorbar (x, y1, err, '~', x, y2, err, '>'); -%! legend ("Y errbar", "X errbar"); +%! legend ('Y errbar', 'X errbar'); %! title ('errorbar() with 2 datasets'); @@ -224,7 +224,7 @@ %! y1 = sin (x); %! y2 = cos (x); %! errorbar (x, y1, err, err, '#r', x, y2, err, err, '#~'); -%! legend ("X errbox", "Y errbox"); +%! legend ('X errbox', 'Y errbox'); %! title ('errorbar() with error boxes'); %!demo @@ -235,7 +235,7 @@ %! y2 = cos (x); %! errorbar (x, y1, err, err, err, err, '~>', ... %! x, y2, err, err, err, err, '#~>-*'); -%! legend ("X-Y errbars", "X-Y errboxes"); +%! legend ('X-Y errbars', 'X-Y errboxes'); %! title ('errorbar() with X-Y errorbars and error boxes'); ## Invisible figure used for tests diff -r 0075f3fba930 -r cafffc1b70b1 scripts/plot/draw/plotyy.m --- a/scripts/plot/draw/plotyy.m Sun Jun 29 13:47:14 2014 +0200 +++ b/scripts/plot/draw/plotyy.m Sun Jun 29 13:53:50 2014 +0200 @@ -279,7 +279,7 @@ %! 'color', [0 0 1], 'horizontalalignment', 'center', 'parent', ax(1)); %! text (4.5, 80, 'Right Axis', ... %! 'color', [0 0.5 0], 'horizontalalignment', 'center', 'parent', ax(2)); -%! title ({"plotyy() example"; "Left axis uses @plot, Right axis uses @semilogy"}); +%! title ({'plotyy() example'; 'Left axis uses @plot, Right axis uses @semilogy'}); %!demo %! clf; diff -r 0075f3fba930 -r cafffc1b70b1 scripts/plot/draw/polar.m --- a/scripts/plot/draw/polar.m Sun Jun 29 13:47:14 2014 +0200 +++ b/scripts/plot/draw/polar.m Sun Jun 29 13:53:50 2014 +0200 @@ -368,7 +368,7 @@ %! theta = linspace (0,2*pi,1000); %! rho = sin (2*theta).*cos (2*theta); %! polar (theta, rho, '--r'); -%! set (gca, "rtick", 0.1:0.1:0.6, "ttick", 0:20:340); +%! set (gca, 'rtick', 0.1:0.1:0.6, 'ttick', 0:20:340); %! title ('polar() plot with finer grid'); %!demo @@ -376,7 +376,7 @@ %! theta = linspace (0,2*pi,1000); %! rho = sin (2*theta).*cos (2*theta); %! polar (theta, rho, '--b'); -%! set (gca, "fontsize", 12, "linewidth", 2, "color", [0.8 0.8 0.8]); +%! set (gca, 'fontsize', 12, 'linewidth', 2, 'color', [0.8 0.8 0.8]); %! title ('polar() plot with modified axis appearance'); %!demo @@ -384,6 +384,6 @@ %! theta = linspace (0,8*pi,1000); %! rho = sin (5/4*theta); %! polar (theta, rho); -%! set (gca, "rtick", 0.2:0.2:1); +%! set (gca, 'rtick', 0.2:0.2:1); %! title ('polar() plot'); diff -r 0075f3fba930 -r cafffc1b70b1 scripts/plot/util/printd.m --- a/scripts/plot/util/printd.m Sun Jun 29 13:47:14 2014 +0200 +++ b/scripts/plot/util/printd.m Sun Jun 29 13:53:50 2014 +0200 @@ -86,13 +86,13 @@ %!demo -%! r2 = char ( -%! 'stem step: 10, data: unsorted.', -%! 'Hinges: lo: 12, hi: 42' , -%! ' 1 | 22118' , -%! ' 2 | 28' , -%! ' 3 | 98' , -%! ' 4 | 244' , +%! r2 = char ( ... +%! 'stem step: 10, data: unsorted.', ... +%! 'Hinges: lo: 12, hi: 42' , ... +%! ' 1 | 22118' , ... +%! ' 2 | 28' , ... +%! ' 3 | 98' , ... +%! ' 4 | 244' , ... %! ' 5 | 2' ); %! printd (r2, 'test_p.txt'); %! system ('cat test_p.txt');