changeset 26032:18449ef91387

figure.m: Remove checking for even number of PROP/VAL pairs and let set() do it. * figure.m: Remove checking for even number of PROP/VAL pairs. Remove 2 input validation tests.
author Rik <rik@octave.org>
date Mon, 05 Nov 2018 08:58:57 -0800
parents 8e0475e6ec15
children f70729091570
files scripts/plot/util/figure.m
diffstat 1 files changed, 0 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/figure.m	Mon Nov 05 08:18:18 2018 -0800
+++ b/scripts/plot/util/figure.m	Mon Nov 05 08:58:57 2018 -0800
@@ -77,11 +77,6 @@
     endif
   endif
 
-  numpairs = nargs - sum (cellfun ("isclass", varargin, "struct"));
-  if (rem (numpairs, 2) == 1)
-    error ("figure: PROPERTY/VALUE arguments must be in pairs");
-  endif
-
   ## Check to see if we already have a figure on the screen.  If we do,
   ## then update it if it is different from the figure we are creating
   ## or switching to.
@@ -135,5 +130,3 @@
 
 %!error <N must be figure handle or figure number> figure (-1)
 %!error <N must be figure handle or figure number> figure (1.5)
-%!error <PROPERTY/VALUE arguments must be in pairs> figure ("color")
-%!error <PROPERTY/VALUE arguments must be in pairs> figure ("color", struct ())