changeset 16472:293f5479a7e7

rgbplot.m: Set the default style to "profile" * scripts/image/rgbplot.m: Set the default style to "profile". Add %!tests.
author Rik <rik@octave.org>
date Mon, 08 Apr 2013 15:19:13 -0700
parents d203a225cf11
children e16f209ed05b
files scripts/image/rgbplot.m
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/rgbplot.m	Mon Apr 08 17:05:43 2013 -0400
+++ b/scripts/image/rgbplot.m	Mon Apr 08 15:19:13 2013 -0700
@@ -44,7 +44,7 @@
 ## @seealso{colormap}
 ## @end deftypefn
 
-function h = rgbplot (cmap, style)
+function h = rgbplot (cmap, style = "profile")
 
   if (nargin < 1 || nargin > 2)
     print_usage ();
@@ -87,4 +87,6 @@
 %!error rgbplot ()
 %!error rgbplot (1,2)
 %!error <CMAP must be a valid colormap> rgbplot ({0 1 0})
+%!error <STYLE must be a string> rgbplot ([0 1 0], 2)
+%!error <unknown style `nostyle'> rgbplot ([0 1 0], "nostyle")