Mercurial > hg > octave-nkf
changeset 9298:20ee7f9cc904
Correct bugs in plot images produced for documentation
Initialized random number generator so hist plot is reproducible.
Fixed errorbar plot where errorbars were not centered on data.
Corrected typo in legend of interpft.
2009-06-03 Rik <rdrider0-list@yahoo.com>
* interpreter/plotimages.m: Correct errorbar plot for docs. Make hist plot
reprodroducible for docs.
* interpreter/interpimages.m: Correct typo in legend of interpft plot for
docs
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Wed, 03 Jun 2009 11:12:51 -0700 |
parents | 0d9f925b9705 |
children | c8c03978832f |
files | doc/ChangeLog doc/interpreter/interpimages.m doc/interpreter/plotimages.m |
diffstat | 3 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2009-06-03 Rik <rdrider0-list@yahoo.com> + + * interpreter/plotimages.m: Correct errorbar plot for docs. Make hist plot + reprodroducible for docs. + * interpreter/interpimages.m: Correct typo in legend of interpft plot for + docs + 2009-06-03 Jaroslav Hajek <highegg@gmail.com> * Makefile.in: Omit conf.texi in DISTFILES.
--- a/doc/interpreter/interpimages.m +++ b/doc/interpreter/interpimages.m @@ -31,7 +31,7 @@ yp = sin (4*ti + 0.3) .* cos (3*ti - 0.1); plot (ti, yp, 'g', ti, interp1(t, y, ti, 'spline'), 'b', ... ti, interpft (y, k), 'c', t, y, 'r+'); - legend ('sin(4t+0.3)cos(3t-0.1','spline','interpft','data'); + legend ('sin(4t+0.3)cos(3t-0.1)','spline','interpft','data'); print (cstrcat (nm, ".", typ), cstrcat ("-d", typ)) elseif (strcmp (nm, "interpn")) x = y = z = -1:1;
--- a/doc/interpreter/plotimages.m +++ b/doc/interpreter/plotimages.m @@ -30,14 +30,17 @@ plot (x, sin (x)); print (cstrcat (nm, ".", typ), cstrcat ("-d", typ)) elseif (strcmp (nm, "hist")) + rand ("state", 2); hist (randn (10000, 1), 30); print (cstrcat (nm, ".", typ), cstrcat ("-d", typ)) elseif (strcmp (nm, "errorbar")) + rand ("state", 2); 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); + yl = 0.1 .* rand (size (x)); + yu = 0.1 .* rand (size (x)); + errorbar (x, sin (x), yl, yu); + axis ([0, 10, -1.1, 1.1]); print (cstrcat (nm, ".", typ), cstrcat ("-d", typ)) elseif (strcmp (nm, "polar")) polar (0:0.1:10*pi, 0:0.1:10*pi);