Mercurial > hg > octave-terminal
changeset 11099:65b240770880
Fix normal line and marker types for errorplots.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 16 Oct 2010 14:38:57 +0400 |
parents | dcde7c5a1d29 |
children | cdf940db26a0 |
files | scripts/ChangeLog scripts/plot/errorbar.m scripts/plot/private/__errplot__.m |
diffstat | 3 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-10-16 Ben Abbott <bpabbott@mac.com> + + * plot/private/__errplot__.m, plot/errorbar.m: Allow line and marker + types to be set. + 2010-10-14 John W. Eaton <jwe@octave.org> * special-matrix/rosser.m: New tests.
--- a/scripts/plot/errorbar.m +++ b/scripts/plot/errorbar.m @@ -52,8 +52,9 @@ ## If @var{fmt} is missing, yerrorbars ("~") plot style is assumed. ## ## If the @var{fmt} argument is supplied, it is interpreted as in -## normal plots. In addition the following plot styles are supported by -## errorbar: +## normal plots. In addition, @var{fmt} may include an errorbar style +## which must preceed the line and marker format. The following plot +## styles are supported by errorbar: ## ## @table @samp ## @item ~ @@ -154,7 +155,7 @@ %! err = x/100; %! y1 = sin (x); %! y2 = cos (x); -%! hg = errorbar (x, y1, err, err, "#", x, y2, err, err, "#~"); +%! hg = errorbar (x, y1, err, err, "#r", x, y2, err, err, "#~"); %!demo %! x = 0:0.5:2*pi; @@ -162,6 +163,5 @@ %! y1 = sin (x); %! y2 = cos (x); %! hg = errorbar (x, y1, err, err, err, err, "~>", ... -%! x, y2, err, err, err, err, "#~>"); -%! set (hg(2), "marker", "*") +%! x, y2, err, err, err, err, "#~>-*");
--- a/scripts/plot/private/__errplot__.m +++ b/scripts/plot/private/__errplot__.m @@ -34,6 +34,8 @@ [fmt, key] = __pltopt__ ("__errplot__", fstr); + fmt + [len, nplots] = size (varargin{1}); h = []; @@ -53,7 +55,7 @@ elseif (strcmp (fmt.errorstyle, "#~>")) ifmt = "boxxy"; else - ifmt = "~"; + ifmt = "yerr"; endif hg = hggroup ("parent", p);