Mercurial > octave-nkf
changeset 10595:46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Fri, 30 Apr 2010 19:08:55 -0400 |
parents | 4b421123fd17 |
children | 24e915c602e7 |
files | scripts/ChangeLog scripts/plot/loglogerr.m scripts/plot/semilogxerr.m scripts/plot/semilogyerr.m |
diffstat | 4 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog Fri Apr 30 18:28:21 2010 -0400 +++ b/scripts/ChangeLog Fri Apr 30 19:08:55 2010 -0400 @@ -1,5 +1,7 @@ 2010-04-30 Ben Abbott <bpabbott@mac.com> + * plot/loglogerr.m, plot/semilogxerr.m, plot/semilogyerr.m: + Add demos. * plot/private/__errplot__.m: Fix bug parsing errorbar style. * plot/private/__errplot__.m: Implement errorbars in the Matlab style.
--- a/scripts/plot/loglogerr.m Fri Apr 30 18:28:21 2010 -0400 +++ b/scripts/plot/loglogerr.m Fri Apr 30 19:08:55 2010 -0400 @@ -60,3 +60,12 @@ end_unwind_protect endfunction + +%!demo +%! x = exp (log(0.01):0.2:log(10)); +%! y = wblpdf (x, 3, 2); +%! eyu = 2*rand (size (y)) .* y; +%! eyl = 0.5*rand (size (y)) .* y; +%! loglogerr (x, y, eyl, eyu, "#~x-") +%! xlim (x([1, end])) +
--- a/scripts/plot/semilogxerr.m Fri Apr 30 18:28:21 2010 -0400 +++ b/scripts/plot/semilogxerr.m Fri Apr 30 19:08:55 2010 -0400 @@ -60,3 +60,10 @@ end_unwind_protect endfunction + +%!demo +%! x = exp (log(0.01):0.2:log(10)); +%! y = wblpdf (x, 2, 2); +%! ey = 0.5*rand (size (y)) .* y; +%! semilogxerr (x, y, ey, "#~x-") +%! xlim (x([1, end]))
--- a/scripts/plot/semilogyerr.m Fri Apr 30 18:28:21 2010 -0400 +++ b/scripts/plot/semilogyerr.m Fri Apr 30 19:08:55 2010 -0400 @@ -59,3 +59,12 @@ end_unwind_protect endfunction + +%!demo +%! x = 0.25:0.25:10; +%! y = wblpdf (x, 4, 2); +%! eyu = rand (size (y)); +%! eyl = 1.0 - 1./(1+eyu); +%! semilogyerr (x, y, eyl.*y, eyu.*y, "~-d") +%! xlim ([0 10]) +