diff scripts/plot/draw/stem.m @ 21222:732ec49d1ec5 stable

Fix regressions caused by ismatrix definition change (partial fix bug #47036). * gray2ind.m: Simplify input checks. Add BIST test. * inpolygon.m: Replace ismatrix with isnumeric in input validation. Add BIST tests. Update copyright date. * __stem__.m: Validate single input is a not an N-D array. * stem.m: Add BIST test for an N-D array input.
author Colin Macdonald <cbm@m.fsf.org>
date Mon, 08 Feb 2016 20:35:29 -0800
parents 4197fc428c7d
children f6aab24ed82e
line wrap: on
line diff
--- a/scripts/plot/draw/stem.m	Sat Feb 06 22:16:38 2016 +0100
+++ b/scripts/plot/draw/stem.m	Mon Feb 08 20:35:29 2016 -0800
@@ -204,15 +204,6 @@
 %!   pause (0.2);
 %! end
 
-%!error stem ()
-%!error <can not define Z for 2-D stem plot> stem (1,2,3)
-%!error <X and Y must be numeric> stem ({1})
-%!error <X and Y must be numeric> stem (1, {1})
-%!error <inconsistent sizes for X and Y> stem (1:2, 1:3)
-%!error <inconsistent sizes for X and Y> stem (1:2, ones (3,3))
-%!error <inconsistent sizes for X and Y> stem (ones (2,2), ones (3,3))
-%!error <No value specified for property "FOO"> stem (1, "FOO")
-
 %!test
 %! ## stemseries share the same baseline and basevalue
 %! hf = figure ("visible", "off");
@@ -228,3 +219,14 @@
 %!   close (hf);
 %! end_unwind_protect
 
+## Test input validation
+%!error stem ()
+%!error <can not define Z for 2-D stem plot> stem (1,2,3)
+%!error <Y must be a vector or 2-D array> stem (ones (2,2,2))
+%!error <X and Y must be numeric> stem ({1})
+%!error <X and Y must be numeric> stem (1, {1})
+%!error <inconsistent sizes for X and Y> stem (1:2, 1:3)
+%!error <inconsistent sizes for X and Y> stem (1:2, ones (3,3))
+%!error <inconsistent sizes for X and Y> stem (ones (2,2), ones (3,3))
+%!error <No value specified for property "FOO"> stem (1, "FOO")
+