diff scripts/plot/private/__errcomm__.m @ 10580:1479b93ee655

Respect linestyleorder in errorbar plots
author David Bateman <dbateman@free.fr>
date Wed, 28 Apr 2010 00:23:57 +0200
parents 95c3e38098bf
children fd0a3ac60b0e
line wrap: on
line diff
--- a/scripts/plot/private/__errcomm__.m	Tue Apr 27 21:20:11 2010 +0200
+++ b/scripts/plot/private/__errcomm__.m	Wed Apr 28 00:23:57 2010 +0200
@@ -32,9 +32,8 @@
   endif
 
   nargs = length (varargin);
-
+  retval = [];
   k = 1;
-  idx = 1;
   data = cell(6,1);
   while (k <= nargs)
     a = varargin{k++};
@@ -51,7 +50,7 @@
     while (k <= nargs)
       a = varargin{k++};
       if (ischar (a) || iscellstr (a))
-        retval(idx++) = __errplot__ (a, p, data{1:ndata});
+        retval = [retval; __errplot__(a, p, data{1:ndata})];
         break;
       elseif (isvector (a))
         a = a(:);
@@ -71,7 +70,7 @@
   endwhile
 
   if (! (ischar (a) || iscellstr (a)))
-    retval(idx++) = __errplot__ ("~", p, data{1:ndata});
+    retval = [retval; __errplot__("~", p, data{1:ndata})];
   endif
 
   drawnow ();