Mercurial > octave-nkf
changeset 16947:24bb7dc754ed
Document command form of colormap().
* colormap.m: the usage of this function as command form was
accidentaly deprecated with cset 92f42d9f2ae4 since it has
always been undocumented. However, we must keep it for
Matlab compatibility (where it is also undocumented).
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Wed, 10 Jul 2013 22:31:46 +0100 |
parents | 92f42d9f2ae4 |
children | ee2166121a28 |
files | scripts/image/colormap.m |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/colormap.m Wed Jul 10 12:43:29 2013 -0700 +++ b/scripts/image/colormap.m Wed Jul 10 22:31:46 2013 +0100 @@ -24,6 +24,7 @@ ## @deftypefnx {Function File} {@var{cmap} =} colormap ("list") ## @deftypefnx {Function File} {@var{cmap} =} colormap ("register", "@var{name}") ## @deftypefnx {Function File} {@var{cmap} =} colormap ("unregister", "@var{name}") +## @deftypefnx {Command} {} colormap @var{map_name} ## Query or set the current colormap. ## ## With no input arguments, @code{colormap} returns the current color map. @@ -40,6 +41,10 @@ ## colormaps. The options "register" and "unregister" will add or remove ## the colormap @var{name} from this list. ## +## For convenience, it is also possible to use this function with the +## command form, where @var{map_name} must be the name of a function +## that returns a colormap. +## ## @seealso{jet} ## @end deftypefn @@ -54,7 +59,6 @@ endif persistent map_list = cell (); - persistent do_warning = true; if (nargin == 1) @@ -65,13 +69,6 @@ cmap = map_list; return; else - ## FIXME: This syntax is deprecated. It is no longer mentioned in - ## documentation and should probably be removed in Octave 3.12. - if (do_warning) - warning (["colormap: deprecated syntax 'colormap (\"%s\")'. " ... - "Use 'colormap (%s (64))'"], map, map); - do_warning = false; - endif map = feval (map); endif endif