diff scripts/plot/private/__patch__.m @ 13115:cd808de114c1

Allow surface and patch to be called w/o arguments. Adding and fixing tests. plot/line.m: Style fixes and test added. plot/patch.m: Tests added. plot/surface.m: Allow surface to be called w/o arguments. Tests added. plot/private/__patch__.m: Allow patch to be called w/o arguments.
author Kai Habel <kai.habel@gmx.de>
date Thu, 08 Sep 2011 15:43:40 +0200
parents cefd568ea073
children e0ef7a3f35d9
line wrap: on
line diff
--- a/scripts/plot/private/__patch__.m
+++ b/scripts/plot/private/__patch__.m
@@ -31,7 +31,10 @@
 
   failed = false;
 
-  if (isstruct (varargin{1}))
+  if (isempty (varargin))
+    args = {"xdata", [0; 1; 1], "ydata", [0; 0; 1], "facecolor", "blue"};
+    args = setvertexdata (args);
+  elseif (isstruct (varargin{1}))
     if (isfield (varargin{1}, "vertices") && isfield (varargin{1}, "faces"))
       args{1} = "faces";
       args{2} = getfield(varargin{1}, "faces");