changeset 20567:2480bbcd1333

fix documentation for new viridis colormap * colormap.m: Fix typo in spelling of viridis. * image.txi: Document viridis.
author John W. Eaton <jwe@octave.org>
date Thu, 01 Oct 2015 13:37:03 -0400
parents dcfbf4c1c3c8
children fcb792acab9b
files doc/interpreter/image.txi scripts/image/colormap.m
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/image.txi	Thu Oct 01 12:50:00 2015 -0400
+++ b/doc/interpreter/image.txi	Thu Oct 01 13:37:03 2015 -0400
@@ -190,6 +190,8 @@
 
 @DOCSTRING(summer)
 
+@DOCSTRING(viridis)
+
 @DOCSTRING(white)
 
 @DOCSTRING(winter)
--- a/scripts/image/colormap.m	Thu Oct 01 12:50:00 2015 -0400
+++ b/scripts/image/colormap.m	Thu Oct 01 13:37:03 2015 -0400
@@ -37,7 +37,7 @@
 ## must be between 0 and 1 inclusive.  The new colormap is returned.
 ##
 ## @code{colormap ("default")} restores the default colormap (the
-## @code{virdis} map with 64 entries).  The default colormap is returned.
+## @code{viridis} map with 64 entries).  The default colormap is returned.
 ##
 ## The map may also be specified by a string, @qcode{"@var{map_name}"}, where
 ## @var{map_name} is the name of a function that returns a colormap.
@@ -52,7 +52,7 @@
 ## colormaps.  The options @qcode{"register"} and @qcode{"unregister"}
 ## add or remove the colormap @var{name} from this list.
 ##
-## @seealso{virdis}
+## @seealso{viridis}
 ## @end deftypefn
 
 ## Author: Tony Richardson <arichard@stark.cc.oh.us>
@@ -79,7 +79,7 @@
     map = varargin{1};
     if (ischar (map))
       if (strcmp (map, "default"))
-        map = virdis (64);
+        map = viridis (64);
       elseif (strcmp (map, "list"))
         cmap = map_list;
         return;
@@ -132,9 +132,9 @@
 %! ## Create an image for displaying a colormap
 %! image (1:64, linspace (0, 1, 64), repmat ((1:64)', 1, 64));
 %! axis ([1, 64, 0, 1], "ticy", "xy");
-%! ## Show 'virdis' colormap
-%! colormap (virdis (64));
-%! title "colormap (virdis (64))"
+%! ## Show 'viridis' colormap
+%! colormap (viridis (64));
+%! title "colormap (viridis (64))"
 %! disp ("Press a key to continue");
 %! pause ();
 %! ## Show 'colorcube' colormap
@@ -152,7 +152,7 @@
 %!   cmap = (get (gcf, "colormap"));
 %!   assert (cmap, cmaptst);
 %!   colormap ("default");
-%!   assert (colormap (), virdis (64));
+%!   assert (colormap (), viridis (64));
 %!   colormap ("ocean");
 %!   assert (colormap, ocean (64));
 %! unwind_protect_cleanup