Added parulacolormap 22/16422/7
Juergen KOCH [Tue, 28 Apr 2015 07:30:33 +0000 (09:30 +0200)]
Change-Id: I1d8c1d893fc5e3f03ec027d2f90164f7051f6ca5

24 files changed:
scilab/CHANGES_5.6.X
scilab/modules/graphics/demos/colormap/colormap.dem.sce
scilab/modules/graphics/demos/misc/misc.dem.sce
scilab/modules/graphics/help/en_US/color_management/autumncolormap.xml
scilab/modules/graphics/help/en_US/color_management/bonecolormap.xml
scilab/modules/graphics/help/en_US/color_management/colormap.xml
scilab/modules/graphics/help/en_US/color_management/coolcolormap.xml
scilab/modules/graphics/help/en_US/color_management/graycolormap.xml
scilab/modules/graphics/help/en_US/color_management/hotcolormap.xml
scilab/modules/graphics/help/en_US/color_management/hsvcolormap.xml
scilab/modules/graphics/help/en_US/color_management/jetcolormap.xml
scilab/modules/graphics/help/en_US/color_management/oceancolormap.xml
scilab/modules/graphics/help/en_US/color_management/parulacolormap.xml [new file with mode: 0644]
scilab/modules/graphics/help/en_US/color_management/pinkcolormap.xml
scilab/modules/graphics/help/en_US/color_management/rainbowcolormap.xml
scilab/modules/graphics/help/en_US/color_management/springcolormap.xml
scilab/modules/graphics/help/en_US/color_management/summercolormap.xml
scilab/modules/graphics/help/en_US/color_management/whitecolormap.xml
scilab/modules/graphics/help/en_US/color_management/wintercolormap.xml
scilab/modules/graphics/macros/parulacolormap.sci [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/parulacolormap.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/parulacolormap.tst [new file with mode: 0644]
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/parulacolormap_1.png [new file with mode: 0644]

index 69698d3..4abc1af 100644 (file)
@@ -6,6 +6,10 @@ New Features
 
 * scatter/scatter3 plot with different mark colors is now available.
 
+* parulacolormap is now available.
+
+* name2rgb can now handle a single string and a matrix of strings.
+
 
 Compilation
 ============
index ad7968d..1681f33 100644 (file)
@@ -109,13 +109,27 @@ function demo_colormap()
     "callback"           , "demo_update_colormap",...
     "tag"                , "jetcolormap_radio");
 
+    jetcolormap_radio = uicontrol( ...
+    "parent"             , demo_plot3d,...
+    "style"              , "radiobutton",...
+    "string"             , "Parula",...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-70 my_cmap_frame_w-25 15],...
+    "horizontalalignment", "left",...
+    "fontname"           , defaultfont,...
+    "fontunits"          , "points",...
+    "fontsize"           , text_font_size,...
+    "value"              , 0, ...
+    "background"          , [1 1 1], ...
+    "callback"           , "demo_update_colormap",...
+    "tag"                , "parulacolormap_radio");
+
     // Colormap : HSVcolormap
 
     HSVcolormap_radio = uicontrol( ...
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "HSV",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-70 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-90 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -131,7 +145,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Hot",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-90 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-110 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -147,7 +161,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Gray",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-110 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-130 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -163,7 +177,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Winter",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-130 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-150 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -179,7 +193,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Spring",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-150 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-170 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -195,7 +209,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Summer",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-170 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-190 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -211,7 +225,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Autumn",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-190 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-210 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -227,7 +241,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Bone",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-210 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-230 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -243,7 +257,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Copper",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-230 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-250 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -259,7 +273,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Pink",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-250 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-270 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -275,7 +289,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Rainbow",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-270 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-290 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -291,7 +305,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "Ocean",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-290 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-310 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -307,7 +321,7 @@ function demo_colormap()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , "White",...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-310 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-330 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -374,6 +388,7 @@ function demo_update_colormap()
     my_figure.immediate_drawing = "off";
 
     set(findobj("tag", "jetcolormap_radio")     , "value", 0);
+    set(findobj("tag", "parulacolormap_radio")     , "value", 0);
     set(findobj("tag", "hotcolormap_radio")     , "value", 0);
     set(findobj("tag", "graycolormap_radio")    , "value", 0);
     set(findobj("tag", "wintercolormap_radio")  , "value", 0);
@@ -394,6 +409,8 @@ function demo_update_colormap()
 
     if get(gcbo, "tag") == "jetcolormap_radio" then
         my_figure.color_map = jetcolormap(128);
+    elseif get(gcbo, "tag") == "parulacolormap_radio" then
+        my_figure.color_map = parulacolormap(128);
     elseif get(gcbo, "tag") == "hotcolormap_radio" then
         my_figure.color_map = hotcolormap(128);
     elseif get(gcbo, "tag") == "graycolormap_radio" then
index 795ef67..762fbe9 100644 (file)
@@ -104,13 +104,29 @@ function demo_misc()
     "callback"           , "demo_update_misc",...
     "tag"                , "jetcolormap_radio");
 
+     // Colormap : Parulacolormap
+
+    jetcolormap_radio = uicontrol( ...
+    "parent"             , demo_plot3d,...
+    "style"              , "radiobutton",...
+    "string"             , gettext("Parula"),...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-70 my_cmap_frame_w-25 15],...
+    "horizontalalignment", "left",...
+    "fontname"           , defaultfont,...
+    "fontunits"          , "points",...
+    "fontsize"           , text_font_size,...
+    "value"              , 0, ...
+    "background"          , [1 1 1], ...
+    "callback"           , "demo_update_misc",...
+    "tag"                , "parulacolormap_radio");
+
     // Colormap : HSVcolormap
 
     HSVcolormap_radio = uicontrol( ...
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("HSV"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-70 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-90 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -126,7 +142,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Hot"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-90 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-110 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -142,7 +158,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Gray"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-110 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-130 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -158,7 +174,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Winter"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-130 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-150 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -174,7 +190,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Spring"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-150 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-170 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -190,7 +206,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Summer"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-170 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-190 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -206,7 +222,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Autumn"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-190 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-210 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -222,7 +238,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Bone"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-210 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-230 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -238,7 +254,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Copper"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-230 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-250 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -254,7 +270,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Pink"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-250 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-270 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -270,7 +286,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Rainbow"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-270 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-290 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -286,7 +302,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("Ocean"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-290 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-310 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -302,7 +318,7 @@ function demo_misc()
     "parent"             , demo_plot3d,...
     "style"              , "radiobutton",...
     "string"             , gettext("White"),...
-    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-310 my_cmap_frame_w-25 15],...
+    "position"           , [ my_frame_pos_x+10 my_frame_pos_y+my_cmap_frame_h-330 my_cmap_frame_w-25 15],...
     "horizontalalignment", "left",...
     "fontname"           , defaultfont,...
     "fontunits"          , "points",...
@@ -404,6 +420,8 @@ function demo_update_misc()
     my_figure.immediate_drawing = "off";
 
     set(findobj("tag", "jetcolormap_radio")     , "value", 0);
+    set(findobj("tag", "parulacolormap_radio")  , "value", 0);
+    set(findobj("tag", "HSVcolormap_radio")     , "value", 0);
     set(findobj("tag", "hotcolormap_radio")     , "value", 0);
     set(findobj("tag", "graycolormap_radio")    , "value", 0);
     set(findobj("tag", "wintercolormap_radio")  , "value", 0);
@@ -413,7 +431,6 @@ function demo_update_misc()
     set(findobj("tag", "bonecolormap_radio")    , "value", 0);
     set(findobj("tag", "coppercolormap_radio")  , "value", 0);
     set(findobj("tag", "pinkcolormap_radio")    , "value", 0);
-    set(findobj("tag", "HSVcolormap_radio")     , "value", 0);
     set(findobj("tag", "rainbowcolormap_radio") , "value", 0);
     set(findobj("tag", "oceancolormap_radio")   , "value", 0);
     set(findobj("tag", "whitecolormap_radio")   , "value", 0);
@@ -424,6 +441,8 @@ function demo_update_misc()
 
     if get(gcbo, "tag") == "jetcolormap_radio" then
         my_figure.color_map = jetcolormap(128);
+    elseif get(gcbo, "tag") == "parulacolormap_radio" then
+        my_figure.color_map = parulacolormap(128);
     elseif get(gcbo, "tag") == "hotcolormap_radio" then
         my_figure.color_map = hotcolormap(128);
     elseif get(gcbo, "tag") == "graycolormap_radio" then
index 4c60788..4d6387d 100644 (file)
@@ -89,6 +89,9 @@ f.color_map = autumncolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index f82653b..8c2896f 100644 (file)
@@ -88,6 +88,9 @@ f.color_map = bonecolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index c627b0d..50aba5f 100644 (file)
@@ -96,6 +96,9 @@ f.color_map=get(sdf(),"color_map");
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index c335537..57d58ae 100644 (file)
@@ -90,6 +90,9 @@ f.color_map = coolcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 243192c..76e2927 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = graycolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 7d91ec6..f32c9c3 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = hotcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 98450c7..4186b7d 100644 (file)
@@ -96,6 +96,9 @@ plot3d1(t,t,z,35,45,"X@Y@Z",[-2,2,2])
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 653218e..09f7d63 100644 (file)
@@ -90,6 +90,9 @@ f.color_map = jetcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 77c1119..bb59057 100644 (file)
@@ -89,6 +89,9 @@ f.color_map = oceancolormap(32);
                 <link linkend="jetcolormap">jetcolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
diff --git a/scilab/modules/graphics/help/en_US/color_management/parulacolormap.xml b/scilab/modules/graphics/help/en_US/color_management/parulacolormap.xml
new file mode 100644 (file)
index 0000000..a7ad296
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) Scilab Enterprises - 2015 - Juergen Koch
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="parulacolormap">
+    <refnamediv>
+        <refname>parulacolormap</refname>
+        <refpurpose>blue to yellow colormap</refpurpose>
+    </refnamediv>
+    <refsynopsisdiv>
+        <title>Calling Sequence</title>
+        <synopsis>cmap=parulacolormap(n)</synopsis>
+    </refsynopsisdiv>
+    <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>n</term>
+                <listitem>
+                    <para>integer &gt;= 3, the colormap size.</para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>cmap</term>
+                <listitem>
+                    <para>
+                        matrix with 3 columns <literal>[R,G,B]</literal>.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Description</title>
+        <para>
+            <literal>parulacolormap</literal> computes a colormap with <literal>n</literal> colors
+            varying from blue to yellow.
+        </para>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+f = scf();
+plot3d1();
+f.color_map = parulacolormap(32);
+ ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = parulacolormap(32);
+        </scilab:image>
+        
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="colormap">colormap</link>
+            </member>
+            <member>
+                <link linkend="autumncolormap">autumncolormap</link>
+            </member>
+            <member>
+                <link linkend="bonecolormap">bonecolormap</link>
+            </member>
+            <member>
+                <link linkend="coppercolormap">coppercolormap</link>
+            </member>
+            <member>
+                <link linkend="coolcolormap">coolcolormap</link>
+            </member>
+            <member>
+                <link linkend="graycolormap">graycolormap</link>
+            </member>
+            <member>
+                <link linkend="hotcolormap">hotcolormap</link>
+            </member>
+            <member>
+                <link linkend="hsvcolormap">hsvcolormap</link>
+            </member>
+            <member>
+                <link linkend="jetcolormap">jetcolormap</link>
+            </member>
+            <member>
+                <link linkend="oceancolormap">oceancolormap</link>
+            </member>
+            <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
+                <link linkend="pinkcolormap">pinkcolormap</link>
+            </member>
+            <member>
+                <link linkend="rainbowcolormap">rainbowcolormap</link>
+            </member>
+            <member>
+                <link linkend="springcolormap">springcolormap</link>
+            </member>
+            <member>
+                <link linkend="summercolormap">summercolormap</link>
+            </member>
+            <member>
+                <link linkend="whitecolormap">whitecolormap</link>
+            </member>
+            <member>
+                <link linkend="wintercolormap">wintercolormap</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>5.6.0</revnumber>
+                <revremark>
+                    Function <function>parulacolormap</function> introduced.
+                </revremark>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
index 0d60754..dc884a2 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = pinkcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="rainbowcolormap">rainbowcolormap</link>
             </member>
             <member>
index 7f6a632..abb6b71 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = rainbowcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 9cb0a92..79ec459 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = springcolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index ddf8b2e..f5b0b4f 100644 (file)
@@ -92,6 +92,9 @@ f.color_map = summercolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index eaf8a81..e805558 100644 (file)
@@ -88,7 +88,10 @@ f.color_map = whitecolormap(32);
             <member>
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
-            <member>
+             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+           <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
index 327b814..76fce9c 100644 (file)
@@ -93,6 +93,9 @@ f.color_map = wintercolormap(32);
                 <link linkend="oceancolormap">oceancolormap</link>
             </member>
             <member>
+                <link linkend="parulacolormap">parulacolormap</link>
+            </member>
+            <member>
                 <link linkend="pinkcolormap">pinkcolormap</link>
             </member>
             <member>
diff --git a/scilab/modules/graphics/macros/parulacolormap.sci b/scilab/modules/graphics/macros/parulacolormap.sci
new file mode 100644 (file)
index 0000000..2f8cef5
--- /dev/null
@@ -0,0 +1,108 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at    
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function cmap = parulacolormap(varargin)
+
+    nDefault = 64;
+    
+    // Check number of input argument
+    if size(varargin) > 1 then
+        error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"), "parulacolormap", 1));
+    end
+    if size(varargin) == 0 then
+        n = nDefault;
+    else
+        n = varargin(1);       
+         // Check type of input argument
+        // Check if input argument is real
+        if typeof(n)<>"constant" | ~isreal(n) then
+            error(msprintf(gettext("%s: Wrong type for input argument #%d: a real scalar expected.\n"), "parulacolormap", 1));
+        end
+        // Check size of input argument
+        if size(n,"*")<>1 then
+            error(msprintf(gettext("%s: Wrong size for input argument #%d: a real scalar expected.\n"), "parulacolormap", 1));
+        end
+    end
+    
+cmapDefault =[
+    0.2081    0.1663    0.5292
+    0.2116    0.1898    0.5777
+    0.2123    0.2138    0.6270
+    0.2081    0.2386    0.6771
+    0.1959    0.2645    0.7279
+    0.1707    0.2919    0.7792
+    0.1253    0.3242    0.8303
+    0.0591    0.3598    0.8683
+    0.0117    0.3875    0.8820
+    0.0060    0.4086    0.8828
+    0.0165    0.4266    0.8786
+    0.0329    0.4430    0.8720
+    0.0498    0.4586    0.8641
+    0.0629    0.4737    0.8554
+    0.0723    0.4887    0.8467
+    0.0779    0.5040    0.8384
+    0.0793    0.5200    0.8312
+    0.0749    0.5375    0.8263
+    0.0641    0.5570    0.8240
+    0.0488    0.5772    0.8228
+    0.0343    0.5966    0.8199
+    0.0265    0.6137    0.8135
+    0.0239    0.6287    0.8038
+    0.0231    0.6418    0.7913
+    0.0228    0.6535    0.7768
+    0.0267    0.6642    0.7607
+    0.0384    0.6743    0.7436
+    0.0590    0.6838    0.7254
+    0.0843    0.6928    0.7062
+    0.1133    0.7015    0.6859
+    0.1453    0.7098    0.6646
+    0.1801    0.7177    0.6424
+    0.2178    0.7250    0.6193
+    0.2586    0.7317    0.5954
+    0.3022    0.7376    0.5712
+    0.3482    0.7424    0.5473
+    0.3953    0.7459    0.5244
+    0.4420    0.7481    0.5033
+    0.4871    0.7491    0.4840
+    0.5300    0.7491    0.4661
+    0.5709    0.7485    0.4494
+    0.6099    0.7473    0.4337
+    0.6473    0.7456    0.4188
+    0.6834    0.7435    0.4044
+    0.7184    0.7411    0.3905
+    0.7525    0.7384    0.3768
+    0.7858    0.7356    0.3633
+    0.8185    0.7327    0.3498
+    0.8507    0.7299    0.3360
+    0.8824    0.7274    0.3217
+    0.9139    0.7258    0.3063
+    0.9450    0.7261    0.2886
+    0.9739    0.7314    0.2666
+    0.9938    0.7455    0.2403
+    0.9990    0.7653    0.2164
+    0.9955    0.7861    0.1967
+    0.9880    0.8066    0.1794
+    0.9789    0.8271    0.1633
+    0.9697    0.8481    0.1475
+    0.9626    0.8705    0.1309
+    0.9589    0.8949    0.1132
+    0.9598    0.9218    0.0948
+    0.9661    0.9514    0.0755
+    0.9763    0.9831    0.0538
+]
+
+if n == 0 then
+    cmap = [];
+elseif n == nDefault then
+    cmap = cmapDefault;
+else
+    cmap = interp1(1:nDefault, cmapDefault, linspace(1,nDefault,n),"linear");
+end
+
+endfunction
diff --git a/scilab/modules/graphics/tests/unit_tests/parulacolormap.dia.ref b/scilab/modules/graphics/tests/unit_tests/parulacolormap.dia.ref
new file mode 100644 (file)
index 0000000..09aaeed
--- /dev/null
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at    
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+// <-- TEST WITH GRAPHIC -->
+assert_checkerror("parulacolormap(0,1,2,3)", "%s: Wrong number of input argument(s): %d expected.\n", 10000, "parulacolormap", 1);
+assert_checkerror("parulacolormap(%t)", "%s: Wrong type for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+assert_checkerror("parulacolormap(%i)", "%s: Wrong type for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+assert_checkerror("parulacolormap([0 1 2 3])", "%s: Wrong size for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+assert_checkequal(parulacolormap(0), []);
diff --git a/scilab/modules/graphics/tests/unit_tests/parulacolormap.tst b/scilab/modules/graphics/tests/unit_tests/parulacolormap.tst
new file mode 100644 (file)
index 0000000..ac051f6
--- /dev/null
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at    
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- TEST WITH GRAPHIC -->
+
+assert_checkerror("parulacolormap(0,1,2,3)", "%s: Wrong number of input argument(s): %d expected.\n", 10000, "parulacolormap", 1);
+
+assert_checkerror("parulacolormap(%t)", "%s: Wrong type for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+
+assert_checkerror("parulacolormap(%i)", "%s: Wrong type for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+
+assert_checkerror("parulacolormap([0 1 2 3])", "%s: Wrong size for input argument #%d: a real scalar expected.\n", 10000, "parulacolormap", 1);
+
+assert_checkequal(parulacolormap(0), []);
index 75bdfaa..b29dbf6 100644 (file)
@@ -1042,6 +1042,7 @@ ordmmd_ru_RU_1.png=65695a27c9eaf674ba4eac782ec20eba
 orthProj_1.png=dd3a07c86d54c910fc4f253c576f1532
 param3d1_1.png=8f23378bea1aa88c53ebe32990958db7
 param3d_1.png=9160991c6c607c8531dff4fe9096a3e2
+parulacolormap_1.png=6d19dadbcf270d0bd89aeda86573f45e
 percentasn_1.png=2c864619bcf4876ed395f49798f0f283
 percentsn_1.png=64ebf9395ff1337fe97136c4b989e264
 percentsn_2.png=4eb98a9c280acc1f705fed25faa64162
diff --git a/scilab/modules/helptools/images/parulacolormap_1.png b/scilab/modules/helptools/images/parulacolormap_1.png
new file mode 100644 (file)
index 0000000..965a607
Binary files /dev/null and b/scilab/modules/helptools/images/parulacolormap_1.png differ