# HG changeset patch # User Rik # Date 1454169318 28800 # Node ID 8b1e030d3d4f7445db19b519e40d770ac624b77a # Parent 6f6eae08836f57d5542e1fee977abad7b87aa4f2 doc: Correct example errobar code and plot (bug #46972). * plot.txi: Correct example code in manual. * plotimages.m: Use correct code from manual to generate errorbar plot. diff -r 6f6eae08836f -r 8b1e030d3d4f doc/interpreter/plot.txi --- a/doc/interpreter/plot.txi Wed Jan 27 12:47:22 2016 +0100 +++ b/doc/interpreter/plot.txi Sat Jan 30 07:55:18 2016 -0800 @@ -177,9 +177,9 @@ @group x = 0:0.1:10; y = sin (x); -yp = 0.1 .* randn (size (x)); -ym = -0.1 .* randn (size (x)); -errorbar (x, sin (x), ym, yp); +lerr = 0.1 .* rand (size (x)); +uerr = 0.1 .* rand (size (x)); +errorbar (x, y, lerr, uerr); @end group @end example diff -r 6f6eae08836f -r 8b1e030d3d4f doc/interpreter/plotimages.m --- a/doc/interpreter/plotimages.m Wed Jan 27 12:47:22 2016 +0100 +++ b/doc/interpreter/plotimages.m Sat Jan 30 07:55:18 2016 -0800 @@ -49,9 +49,9 @@ rand ("state", 2); x = 0:0.1:10; y = sin (x); - yl = 0.1 .* rand (size (x)); - yu = 0.1 .* rand (size (x)); - errorbar (x, sin (x), yl, yu); + lerr = 0.1 .* rand (size (x)); + uerr = 0.1 .* rand (size (x)); + errorbar (x, y, lerr, uerr); axis ([0, 10, -1.1, 1.1]); xlabel ("x"); ylabel ("sin (x)");