# HG changeset patch # User jwe # Date 1027648052 0 # Node ID 31448e09d38ea74dcafe8a26f3da7e9bd70b7d84 # Parent efac4b97bb09bc32d8de8c5b8ea2db04a4480da3 [project @ 2002-07-26 01:47:32 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2002-07-25 John W. Eaton + + * plot/loglogerr.m: Likewise. + + * plot/semilogyerr.m: Likewise. + + * plot/semilogxerr.m: Use varargin instead of old style varargs. + 2002-07-25 Teemu Ikonen * plot/__errcomm__.m: New file. Common functionality for error plots. diff --git a/scripts/plot/__errplot__.m b/scripts/plot/__errplot__.m --- a/scripts/plot/__errplot__.m +++ b/scripts/plot/__errplot__.m @@ -1,4 +1,4 @@ -## Copyright (C) 2000-2002 Teemu Ikonen +## Copyright (C) 2000, 2001, 2002 Teemu Ikonen ## ## This file is part of Octave. ## @@ -20,7 +20,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} __errplot__ (@var{args}) ## Really plot errorbar plots. User interface in function errorbar. -## +## ## @example ## __errplot__ (@var{arg1}, @var{arg2}, ..., @var{fmt}) ## @end example @@ -52,12 +52,12 @@ fstr = a; endif endwhile - + fmt = __pltopt__ ("__errplot__", fstr); - + nplots = size (arg1, 2); len = size (arg1, 1); - + if (ndata == 2) for i = 1:nplots, tmp = [(1:len)', arg1(:,i), arg2(:,i)]; @@ -94,8 +94,8 @@ eval (tstr); cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) ); eval (cmd); - endfor - else + endfor + else for i = 1:nplots, tstr = "tmp = [arg1(:,i)"; for j = 2:ndata, @@ -107,9 +107,5 @@ eval (cmd); endfor endif - -endfunction - - - +endfunction diff --git a/scripts/plot/__pltopt1__.m b/scripts/plot/__pltopt1__.m --- a/scripts/plot/__pltopt1__.m +++ b/scripts/plot/__pltopt1__.m @@ -72,9 +72,9 @@ ## First get next char. if (max (size (opt)) > 1) -# [char, opt] = sscanf (opt, "%c %s", "C"); - char = opt(1); - opt = opt(2:length(opt)); + ## [char, opt] = sscanf (opt, "%c %s", "C"); + char = opt(1); + opt = opt(2:length(opt)); else char = opt; more_opts = 0; @@ -106,7 +106,7 @@ elseif (strcmp (char, "~")) set_yerrbars = 1; elseif (strcmp (char, ">")) - set_xerrbars = 1; + set_xerrbars = 1; elseif (strcmp (char, "#")) set_boxes = 1; elseif (strcmp (char, "0") || strcmp (char, "1") ... @@ -227,11 +227,11 @@ endif if (strcmp (fmt, WITH)) - if(strcmp (caller, "__errplot")) - fmt = strcat (fmt, " ", YERRORBARS); - else - fmt = strcat (fmt, " ", LINES); - endif + if (strcmp (caller, "__errplot__")) + fmt = strcat (fmt, " ", YERRORBARS); + else + fmt = strcat (fmt, " ", LINES); + endif endif if (set_color) diff --git a/scripts/plot/errorbar.m b/scripts/plot/errorbar.m --- a/scripts/plot/errorbar.m +++ b/scripts/plot/errorbar.m @@ -1,4 +1,4 @@ -## Copyright (C) 2000-2002 Teemu Ikonen +## Copyright (C) 2000, 2001, 2002 Teemu Ikonen ## ## This file is part of Octave. ## @@ -119,7 +119,9 @@ gset nologscale x; gset nologscale y; gset nopolar; - - __errcomm__ ("errorbar", varargin); + + length (varargin) + + __errcomm__ ("errorbar", varargin{:}); endfunction