diff scripts/plot/__pltopt__.m @ 6264:cc2bee854d23

[project @ 2007-02-01 10:00:05 by jwe]
author jwe
date Thu, 01 Feb 2007 10:00:05 +0000
parents 1a6d826e92b5
children 0078497b3b0b
line wrap: on
line diff
--- a/scripts/plot/__pltopt__.m
+++ b/scripts/plot/__pltopt__.m
@@ -108,9 +108,9 @@
 
 ## Author: jwe
 
-function [fmt, keystr] = __pltopt__ (caller, opt)
+function options = __pltopt__ (caller, opt)
 
-  if (nargin == 2 && nargout == 2)
+  if (nargin == 2 && nargout == 1)
     if (ischar (opt))
       nel = rows (opt);
     elseif (iscellstr (opt))
@@ -118,15 +118,11 @@
     else
       error ("__pltopt__: expecting argument to be character string or cell array of character strings");
     endif
-    fmt = cell (nel, 1);
-    keystr = cell (nel, 1);
     if (ischar (opt))
       opt = cellstr (opt);
     endif
-    for i = 1:nel
-      [tfmt, tkey]  = __pltopt1__ (caller, opt{i});
-      fmt{i} = tfmt;
-      keystr{i} = tkey;
+    for i = nel:-1:1
+      options(i) = __pltopt1__ (caller, opt{i});
     endfor
   else
     print_usage ();