diff scripts/plot/errorbar.m @ 17198:df4c4b7708a4

Add titles and clean-up plotting %!demos. * scripts/plot/area.m, scripts/plot/axis.m, scripts/plot/bar.m, scripts/plot/barh.m, scripts/plot/clabel.m, scripts/plot/colorbar.m, scripts/plot/comet.m, scripts/plot/comet3.m, scripts/plot/contour.m, scripts/plot/contour3.m, scripts/plot/contourf.m, scripts/plot/cylinder.m, scripts/plot/ellipsoid.m, scripts/plot/errorbar.m, scripts/plot/ezplot.m, scripts/plot/ezplot3.m, scripts/plot/ezpolar.m, scripts/plot/feather.m, scripts/plot/fplot.m, scripts/plot/hold.m, scripts/plot/isosurface.m, scripts/plot/legend.m, scripts/plot/loglog.m, scripts/plot/loglogerr.m, scripts/plot/mesh.m, scripts/plot/meshc.m, scripts/plot/meshz.m, scripts/plot/patch.m, scripts/plot/pcolor.m, scripts/plot/pie.m, scripts/plot/pie3.m, scripts/plot/plot.m, scripts/plot/plot3.m, scripts/plot/polar.m, scripts/plot/rectangle.m, scripts/plot/ribbon.m, scripts/plot/rose.m, scripts/plot/scatter.m, scripts/plot/scatter3.m, scripts/plot/semilogx.m, scripts/plot/semilogxerr.m, scripts/plot/semilogy.m, scripts/plot/semilogyerr.m, scripts/plot/sombrero.m, scripts/plot/stem3.m, scripts/plot/surf.m, scripts/plot/surfc.m, scripts/plot/surfl.m, scripts/plot/title.m, scripts/plot/waterfall.m: Add titles and clean-up plotting %!demos.
author Rik <rik@octave.org>
date Tue, 06 Aug 2013 14:34:20 -0700
parents 26589abbc78d
children 87ba70043bfc
line wrap: on
line diff
--- a/scripts/plot/errorbar.m
+++ b/scripts/plot/errorbar.m
@@ -153,12 +153,14 @@
 %! rand_1x11_data1 = [0.82712, 0.50325, 0.35613, 0.77089, 0.20474, 0.69160, 0.30858, 0.88225, 0.35187, 0.14168, 0.54270];
 %! rand_1x11_data2 = [0.506375, 0.330106, 0.017982, 0.859270, 0.140641, 0.327839, 0.275886, 0.162453, 0.807592, 0.318509, 0.921112];
 %! errorbar (0:10, rand_1x11_data1, 0.25*rand_1x11_data2);
+%! title ('errorbar() with Y errorbars');
 
 %!demo
 %! clf;
 %! rand_1x11_data3 = [0.423650, 0.142331, 0.213195, 0.129301, 0.975891, 0.012872, 0.635327, 0.338829, 0.764997, 0.401798, 0.551850];
 %! rand_1x11_data4 = [0.682566, 0.456342, 0.132390, 0.341292, 0.108633, 0.601553, 0.040455, 0.146665, 0.309187, 0.586291, 0.540149];
 %! errorbar (0:10, rand_1x11_data3, rand_1x11_data4, '>');
+%! title ('errorbar() with X errorbars');
 
 %!demo
 %! clf;
@@ -166,7 +168,10 @@
 %! err = x/30;
 %! y1 = sin (x);
 %! y2 = cos (x);
-%! hg = errorbar (x, y1, err, '~', x, y2, err, '>');
+%! errorbar (x, y1, err, '~', x, y2, err, '>');
+%! legend ("Y errbar", "X errbar");
+%! title ('errorbar() with 2 datasets');
+
 
 %!demo
 %! clf;
@@ -174,7 +179,9 @@
 %! err = x/30;
 %! y1 = sin (x);
 %! y2 = cos (x);
-%! hg = errorbar (x, y1, err, err, '#r', x, y2, err, err, '#~');
+%! errorbar (x, y1, err, err, '#r', x, y2, err, err, '#~');
+%! legend ("X errbox", "Y errbox");
+%! title ('errorbar() with error boxes');
 
 %!demo
 %! clf;
@@ -182,6 +189,8 @@
 %! err = x/30;
 %! y1 = sin (x);
 %! y2 = cos (x);
-%! hg = errorbar (x, y1, err, err, err, err, '~>', ...
-%!                x, y2, err, err, err, err, '#~>-*');
+%! errorbar (x, y1, err, err, err, err, '~>', ...
+%!           x, y2, err, err, err, err, '#~>-*');
+%! legend ("X-Y errbars", "X-Y errboxes");
+%! title ('errorbar() with X-Y errorbars and error boxes');