diff scripts/plot/refreshdata.m @ 11469:c776f063fefe

Overhaul m-script files to use common variable name between code and documentation.
author Rik <octave@nomad.inbox5.com>
date Sun, 09 Jan 2011 12:41:21 -0800
parents c9b0a75b02e8
children 1740012184f9
line wrap: on
line diff
--- a/scripts/plot/refreshdata.m
+++ b/scripts/plot/refreshdata.m
@@ -50,11 +50,11 @@
 ## @end example
 ## @end deftypefn
 
-function refreshdata (h, ws)
+function refreshdata (h, workspace)
 
   if (nargin == 0)
     h = gcf ();
-    ws = "base";
+    workspace = "base";
   else
     if (iscell (h))
       h = [h{:}];
@@ -63,12 +63,14 @@
       error ("refreshdata: expecting a list of figure handles");
     endif
     if (nargin < 2)
-      ws = "base";
+      workspace = "base";
     else
-      if (!ischar (ws) || !(strcmpi (ws, "base") || strcmpi (ws, "caller")))
+      if (   !ischar (workspace) 
+          || !(strcmpi (workspace, "base")
+          || strcmpi (workspace, "caller")))
         error ("refreshdata: expecting workspace to be \"base\" or ""caller\"");
       else
-        ws = tolower (ws);
+        workspace = tolower (workspace);
       endif
     endif
   endif
@@ -93,7 +95,7 @@
     for j = 1 : length (props {i})
       expr = get (objs(i), props{i}{j});
       if (!isempty (expr))
-        val = evalin (ws, expr);
+        val = evalin (workspace, expr);
         prop =  props{i}{j}(1:end-6);
         if (! isequal (get (objs(i), prop), val))
           set (objs(i), props{i}{j}(1:end-6), val);