[doc] uigetcolor() and colormap pages illustrated 93/21693/4
Samuel GOUGEON [Sun, 31 Jan 2021 01:27:11 +0000 (02:27 +0100)]
Change-Id: If9f789ef94a51a330254a9172176783bb123f613

16 files changed:
scilab/modules/graphics/help/en_US/color_management/colormap.xml
scilab/modules/graphics/help/en_US/color_management/uigetcolor.xml
scilab/modules/graphics/help/images/uigetcolor_1.png [new file with mode: 0644]
scilab/modules/graphics/help/images/uigetcolor_RGB.png [new file with mode: 0644]
scilab/modules/graphics/help/ja_JP/color_management/colormap.xml
scilab/modules/graphics/help/ja_JP/color_management/uigetcolor.xml
scilab/modules/graphics/help/pt_BR/color_management/colormap.xml
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/colormap_1.png [deleted file]
scilab/modules/helptools/images/colormap_en_US_1.png [new file with mode: 0644]
scilab/modules/helptools/images/colormap_fr_FR_1.png [new file with mode: 0644]
scilab/modules/helptools/images/colormap_ja_JP_1.png [new file with mode: 0644]
scilab/modules/helptools/images/colormap_pt_BR_1.png [new file with mode: 0644]
scilab/modules/helptools/images/colormap_ru_RU_1.png [new file with mode: 0644]
scilab/modules/helptools/images/uigetcolor_1.png [new file with mode: 0644]
scilab/modules/helptools/images/uigetcolor_RGB.png [new file with mode: 0644]

index bf0b51c..b4ec3e6 100644 (file)
@@ -2,8 +2,8 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA
- *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2021 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * along with this program.
  *
  -->
-<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="colormap">
+<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="colormap">
     <refnamediv>
         <refname>colormap</refname>
         <refpurpose>using colormaps</refpurpose>
     <refsection>
         <title>Description</title>
         <para>
-            A colormap <literal>cmap</literal> is defined by a m x 3 matrix. m is the number of colors.
-            Color number i is given as a 3-uple <literal>cmap(i,1)</literal>, <literal>cmap(i,2)</literal>
-            <literal>cmap(i,3)</literal>
-            corresponding respectively to red, green and blue intensity between
-            0 and 1.
+            A colormap <literal>cmap</literal> is defined by a m x 3 matrix of Red, Green and Blue
+            colors intensities in the [0,1] interval. m is the number of colors defined in the colormap.
+            The color number i is given in the ith row as a 3-uple <literal>cmap(i,1)</literal>,
+            <literal>cmap(i,2)</literal>, <literal>cmap(i,3)</literal>. For a given colormap,
+            this index i identifies the color.
         </para>
         <para>
-            At the beginning, 32 colors are defined in the colormap. You can
-            change the colormap of a figure by using <literal>set(f,"color_map",cmap)</literal>
+            The default factory colormap defines 32 colors. You can
+            change the colormap of a figure by using <literal>f.color_map=cmap</literal>
             where <literal>f</literal> is the handle of the figure.
         </para>
         <para>
-            Each color in the colormap has an id you have to use to specify color
-            in most plot functions. To see the ids, use function <link linkend="getcolor">getcolor</link>.
+            Each color in the colormap has an index you have to use to specify color in most plot
+            functions. To see the indices, use function <link linkend="getcolor">getcolor</link>.
+        </para>
+        <para>
+            A set of functions from <link linkend="autumncolormap">autumncolormap(n)</link>
+            to <link linkend="wintercolormap">wintercolormap(n)</link> provide swatches that can be
+            set to colormaps. They are illustrated here-below.
+        </para>
+        <para>
+            The colormap of the current figure can be retrieved with <literal>cmap = gcf().color_map</literal>.
         </para>
         <para>
-            The functions <link linkend="hotcolormap">hotcolormap</link>, <link linkend="jetcolormap">jetcolormap</link> and  <link linkend="graycolormap">graycolormap</link>
-            provide colormaps with continuous variation of the colors.
+            The current default colormap can be retrieved with <literal>cmap = gdf().color_map</literal>.
         </para>
         <para>
-            You can get the default colormap by <literal>cmap=get(sdf(),"color_map")</literal>.
+            The factory default colormap can be retrieved with <literal>cmap = sdf().color_map</literal>.
         </para>
     </refsection>
     <refsection>
+        <title>Sample</title>
+        <scilab:image localized="true">
+            cm = ["autumn" "bone" "cool" "copper" "gray" "hot" "hsv" "jet" "ocean" ..
+                  "parula" "pink" "rainbow" "spring" "summer" "white" "winter"];
+
+            ncm = size(cm,"*");
+            indices = [];
+            cmap = [];
+            for i = 0:ncm-1
+                indices = [indices ; (1:100)+i*100];
+                execstr("cols = "+cm(i+1)+"colormap(100);");
+                cmap = [cmap ; cols];
+            end
+            f = gcf();
+            clf
+            f.color_map = cmap;
+            Matplot(indices)
+
+            xgrid([color("grey50") -1]);
+            gca().grid_position = "foreground";
+
+            title(_("Available swatches: #colormap(100)"), "fontsize", 4);
+            xlabel(_("Colors indices in [1,100]"), "fontsize", 3);
+            gca().y_ticks = tlist(["ticks" "locations" "labels"],16:-1:1,cm);
+            set(gca(), "font_size", 2, "sub_ticks",[4 0], "margins", [0.12 0.05 0.08 0.08]);
+
+            gcf().axes_size = [650 650];
+        </scilab:image>
+    </refsection>
+    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-n=64;
-r=linspace(0,1,n)';
-g=linspace(1,0,n)';
-b=ones(r);
-cmap=[r g b];
-f=gcf(); f.color_map=cmap;
+n = 64;
+r = linspace(0,1,n)';
+g = linspace(1,0,n)';
+b = ones(r);
+cmap = [r g b];
+f = gcf(); f.color_map = cmap;
 plot3d1()
-f.color_map=get(sdf(),"color_map");
- ]]></programlisting>
-        <scilab:image>
-            n=64;
-            r=linspace(0,1,n)';
-            g=linspace(1,0,n)';
-            b=ones(r);
-            cmap=[r g b];
-            f=gcf(); f.color_map=cmap;
-            plot3d1()
-            f.color_map=get(sdf(),"color_map");
-        </scilab:image>
-
+f.color_map = gdf().color_map; // restores to the default colormap
+     ]]></programlisting>
+        <para/>
+        <programlisting role="example"><![CDATA[
+gdf().color_map
+     ]]></programlisting>
+        <screen><![CDATA[
+--> gdf().color_map
+ ans  =
+   0.          0.          0.
+   0.          0.          1.
+   0.          1.          0.
+   0.          1.          1.
+   1.          0.          0.
+   1.          0.          1.
+   1.          1.          0.
+   1.          1.          1.
+   0.          0.          0.5647059
+   0.          0.          0.6901961
+   0.          0.          0.8156863
+   0.5294118   0.8078431   1.
+   0.          0.5647059   0.
+   0.          0.6901961   0.
+   0.          0.8156863   0.
+   0.          0.5647059   0.5647059
+   0.          0.6901961   0.6901961
+   0.          0.8156863   0.8156863
+   0.5647059   0.          0.
+   0.6901961   0.          0.
+   0.8156863   0.          0.
+   0.5647059   0.          0.5647059
+   0.6901961   0.          0.6901961
+   0.8156863   0.          0.8156863
+   0.5019608   0.1882353   0.
+   0.627451    0.2509804   0.
+   0.7529412   0.3764706   0.
+   1.          0.5019608   0.5019608
+   1.          0.627451    0.627451
+   1.          0.7529412   0.7529412
+   1.          0.8784314   0.8784314
+   1.          0.8431373   0.
+]]></screen>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
@@ -125,6 +194,9 @@ f.color_map=get(sdf(),"color_map");
             <member>
                 <link linkend="getcolor">getcolor</link>
             </member>
+            <member>
+                <link linkend="colordef">colordef</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index 13846a8..e6b828f 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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="uigetcolor">
+<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="uigetcolor">
     <refnamediv>
         <refname>uigetcolor</refname>
         <refpurpose>Opens a dialog for selecting a color.</refpurpose>
         <title>Syntax</title>
         <synopsis>
             uigetcolor()
-            RGB = uigetcolor([title])
-            RGB = uigetcolor([title,] defaultRGB)
-            RGB = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
-            [R, G, B] = uigetcolor([title])
-            [R, G, B] = uigetcolor([title,] defaultRGB)
-            [R, G, B] = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
+
+            RGB = uigetcolor()
+            RGB = uigetcolor(defaultRGB)
+            RGB = uigetcolor(defaultRed, defaultGreen, defaultBlue)
+            RGB = uigetcolor(title, ..)
+
+            [R, G, B] = uigetcolor()
+            [R, G, B] = uigetcolor(defaultRGB)
+            [R, G, B] = uigetcolor(defaultRed, defaultGreen, defaultBlue)
+            [R, G, B] = uigetcolor(title, ..)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
             <varlistentry>
                 <term>title</term>
                 <listitem>
-                    <para>String: Optional argument, the title to display in the dialog. Default value is "Color Chooser".</para>
+                    <para>
+                        String: Optional argument, the title to display in the dialog.
+                        Default value is "Color Chooser".
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>defaultRGB</term>
                 <listitem>
-                    <para>1x3 vector: the default values for Red, Green and Blue values given as a vector [red, green, blue].</para>
+                    <para>
+                        1x3 vector [red, green, blue] of default values in [0, 255] for Red, Green
+                        and Blue intensities.
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>defaultRed</term>
+                <term>defaultRed, defaultGreen, defaultBlue</term>
                 <listitem>
-                    <para>Scalar: the default value for red.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>defaultGreen</term>
-                <listitem>
-                    <para>Scalar: the default value for green.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>defaultBlue</term>
-                <listitem>
-                    <para>Scalar: the default value for blue.</para>
+                    <para>
+                        Integers in [0, 255]: Scalar default values for Red, Green, and Blue
+                        intensities.
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>RGB</term>
                 <listitem>
-                    <para>1x3 vector: the values for Red, Green and Blue values given as a vector [red, green, blue] or [] if the user cancels.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>R</term>
-                <listitem>
-                    <para>Scalar: the value for red or [] if the user cancels.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>G</term>
-                <listitem>
-                    <para>Scalar: the value for green or [] if the user cancels.</para>
+                    <para>
+                        1x3 vector [red, green, blue] of values in [0, 255] for Red, Green and Blue
+                        intensities, or [] if the user cancels.
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>B</term>
+                <term>R, G, B</term>
                 <listitem>
-                    <para>Scalar: the value for blue or [] if the user cancels.</para>
+                    <para>
+                        Integers in [0, 255]: Scalar values for Red, Green and Blue intensities,
+                        or [] if the user cancels.
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Description</title>
-        <para>Creates a dialog window for selecting a color. All (default and returned) values must be in the interval [0 255].</para>
+        <para>
+            Creates a dialog window for selecting a color. All (default and returned) values are
+            in the interval [0 255].
+        </para>
     </refsection>
     <refsection>
         <title>Examples</title>
 uigetcolor()
 [R, G, B] = uigetcolor([255 128 0])
 RBG = uigetcolor(0, 128, 255)
-RBG = uigetcolor("My color chooser", 0, 128, 255)
- ]]></programlisting>
+RBG = uigetcolor("My color chooser", 250, 150, 50)
+     ]]></programlisting>
+        <para/>
+        <inlinemediaobject>
+            <imageobject>
+                <imagedata fileref="../../images/uigetcolor_1.png"/>
+            </imageobject>
+            <para/>
+            <imageobject>
+                <imagedata fileref="../../images/uigetcolor_RGB.png"/>
+            </imageobject>
+        </inlinemediaobject>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
diff --git a/scilab/modules/graphics/help/images/uigetcolor_1.png b/scilab/modules/graphics/help/images/uigetcolor_1.png
new file mode 100644 (file)
index 0000000..b660018
Binary files /dev/null and b/scilab/modules/graphics/help/images/uigetcolor_1.png differ
diff --git a/scilab/modules/graphics/help/images/uigetcolor_RGB.png b/scilab/modules/graphics/help/images/uigetcolor_RGB.png
new file mode 100644 (file)
index 0000000..6693870
Binary files /dev/null and b/scilab/modules/graphics/help/images/uigetcolor_RGB.png differ
index 0ebc352..feae032 100644 (file)
@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
-
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
  * Copyright (C) INRIA
-
- *
-
-
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2021 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * and continues to be available under such terms.
  * For more information, see the COPYING file which you should have received
  * along with this program.
-
  *
-
  -->
-
-<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="ja" xml:id="colormap">
-
+<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="ja" xml:id="colormap">
     <refnamediv>
-
         <refname>colormap</refname>
-
         <refpurpose>カラーマップを定義</refpurpose>
-
     </refnamediv>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             カラーマップ <literal>cmap</literal> はm x 3行列で定義されます.
-
             m は色の数です.
-
             色番号 i は, それぞれ赤, 緑, 青の彩度(範囲は0から1)を表す
-
             <literal>cmap(i,1)</literal>, <literal>cmap(i,2)</literal>,
-
             <literal>cmap(i,3)</literal> の組で指定されます.
-
         </para>
-
         <para>
-
             最初,カラーマップには32種類の色が定義されています.
-
             特定の図のカラーマップを <literal>set(f,"color_map",cmap)</literal>
-
             により変更することが可能です.
-
             ただし,  <literal>f</literal>は図のハンドルです.
-
         </para>
-
         <para>
-
             カラーマップの各色は,多くのプロット関数で色を指定するために使用する
-
             際に使用されるIDを有しています.
-
             このIDを参照するには,関数<link linkend="getcolor">getcolor</link>
-
             を使用してください.
-
         </para>
-
         <para>
-
-            関数 <link linkend="hotcolormap">hotcolormap</link>, <link linkend="jetcolormap">jetcolormap</link> および
-
-            <link linkend="graycolormap">graycolormap</link> は,
-
-            連続的に変化する色を有するカラーマップを提供します.
-
+            A set of functions from <link linkend="autumncolormap">autumncolormap(n)</link>
+            to <link linkend="wintercolormap">wintercolormap(n)</link> provide swatches that can be
+            set to colormaps. They are illustrated here-below.
         </para>
-
         <para>
-
-            デフォルトのカラーマップを<literal>cmap=get(sdf(),"color_map")</literal>
-
-            により取得できます.
-
+            The colormap of the current figure can be retrieved with <literal>cmap = gcf().color_map</literal>.
+        </para>
+        <para>
+            The current default colormap can be retrieved with <literal>cmap = gdf().color_map</literal>.
+        </para>
+        <para>
+            The factory default colormap can be retrieved with <literal>cmap = sdf().color_map</literal>.
         </para>
-
     </refsection>
-
     <refsection>
-
+        <title>Sample</title>
+        <scilab:image localized="true">
+            cm = ["autumn" "bone" "cool" "copper" "gray" "hot" "hsv" "jet" "ocean" ..
+                  "parula" "pink" "rainbow" "spring" "summer" "white" "winter"];
+
+            ncm = size(cm,"*");
+            indices = [];
+            cmap = [];
+            for i = 0:ncm-1
+                indices = [indices ; (1:100)+i*100];
+                execstr("cols = "+cm(i+1)+"colormap(100);");
+                cmap = [cmap ; cols];
+            end
+            f = gcf();
+            clf
+            f.color_map = cmap;
+            Matplot(indices)
+
+            xgrid([color("grey50") -1]);
+            gca().grid_position = "foreground";
+
+            title(_("Available swatches: #colormap(100)"), "fontsize", 4);
+            xlabel(_("Colors indices in [1,100]"), "fontsize", 3);
+            gca().y_ticks = tlist(["ticks" "locations" "labels"],16:-1:1,cm);
+            set(gca(), "font_size", 2, "sub_ticks",[4 0], "margins", [0.12 0.05 0.08 0.08]);
+
+            gcf().axes_size = [650 650];
+        </scilab:image>
+    </refsection>
+    <refsection>
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-
-n=64;
-
-r=linspace(0,1,n)';
-
-g=linspace(1,0,n)';
-
-b=ones(r);
-
-cmap=[r g b];
-
-f=gcf(); f.color_map=cmap;
-
+n = 64;
+r = linspace(0,1,n)';
+g = linspace(1,0,n)';
+b = ones(r);
+cmap = [r g b];
+f = gcf(); f.color_map = cmap;
 plot3d1()
-
-f.color_map=get(sdf(),"color_map");
-
- ]]></programlisting>
-
-        <scilab:image>
-
-            n=64;
-
-            r=linspace(0,1,n)';
-
-            g=linspace(1,0,n)';
-
-            b=ones(r);
-
-            cmap=[r g b];
-
-            f=gcf(); f.color_map=cmap;
-
-            plot3d1()
-
-            f.color_map=get(sdf(),"color_map");
-
-        </scilab:image>
-
+f.color_map = gdf().color_map; // restores to the default colormap
+     ]]></programlisting>
+        <para/>
+        <programlisting role="example"><![CDATA[
+gdf().color_map
+     ]]></programlisting>
+        <screen><![CDATA[
+--> gdf().color_map
+ ans  =
+   0.          0.          0.
+   0.          0.          1.
+   0.          1.          0.
+   0.          1.          1.
+   1.          0.          0.
+   1.          0.          1.
+   1.          1.          0.
+   1.          1.          1.
+   0.          0.          0.5647059
+   0.          0.          0.6901961
+   0.          0.          0.8156863
+   0.5294118   0.8078431   1.
+   0.          0.5647059   0.
+   0.          0.6901961   0.
+   0.          0.8156863   0.
+   0.          0.5647059   0.5647059
+   0.          0.6901961   0.6901961
+   0.          0.8156863   0.8156863
+   0.5647059   0.          0.
+   0.6901961   0.          0.
+   0.8156863   0.          0.
+   0.5647059   0.          0.5647059
+   0.6901961   0.          0.6901961
+   0.8156863   0.          0.8156863
+   0.5019608   0.1882353   0.
+   0.627451    0.2509804   0.
+   0.7529412   0.3764706   0.
+   1.          0.5019608   0.5019608
+   1.          0.627451    0.627451
+   1.          0.7529412   0.7529412
+   1.          0.8784314   0.8784314
+   1.          0.8431373   0.
+]]></screen>
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="autumncolormap">autumncolormap</link>
-
             </member>
-
             <member>
-
                 <link linkend="bonecolormap">bonecolormap</link>
-
             </member>
-
             <member>
-
                 <link linkend="coolcolormap">coolcolormap</link>
-
             </member>
-
             <member>
-
                 <link linkend="coppercolormap">coppercolormap</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="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>
-
             <member>
-
                 <link linkend="color">color</link>
-
             </member>
-
             <member>
-
                 <link linkend="getcolor">getcolor</link>
-
             </member>
-
+            <member>
+                <link linkend="colordef">colordef</link>
+            </member>
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 337d252..acfbd7d 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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="ja" xml:id="uigetcolor">
+<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="ja" xml:id="uigetcolor">
     <refnamediv>
         <refname>uigetcolor</refname>
         <refpurpose>色を選択するダイアログを開く.</refpurpose>
         <title>呼び出し手順</title>
         <synopsis>
             uigetcolor()
-            RGB = uigetcolor([title])
-            RGB = uigetcolor([title,] defaultRGB)
-            RGB = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
-            [R, G, B] = uigetcolor([title])
-            [R, G, B] = uigetcolor([title,] defaultRGB)
-            [R, G, B] = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
+
+            RGB = uigetcolor()
+            RGB = uigetcolor(defaultRGB)
+            RGB = uigetcolor(defaultRed, defaultGreen, defaultBlue)
+            RGB = uigetcolor(title, ..)
+
+            [R, G, B] = uigetcolor()
+            [R, G, B] = uigetcolor(defaultRGB)
+            [R, G, B] = uigetcolor(defaultRed, defaultGreen, defaultBlue)
+            [R, G, B] = uigetcolor(title, ..)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
 uigetcolor()
 [R, G, B] = uigetcolor([255 128 0])
 RBG = uigetcolor(0, 128, 255)
-RBG = uigetcolor("My color chooser", 0, 128, 255)
- ]]></programlisting>
+RBG = uigetcolor("My color chooser", 250, 150, 50)
+     ]]></programlisting>
+        <para/>
+        <inlinemediaobject>
+            <imageobject>
+                <imagedata fileref="../../images/uigetcolor_1.png"/>
+            </imageobject>
+            <para/>
+            <imageobject>
+                <imagedata fileref="../../images/uigetcolor_RGB.png"/>
+            </imageobject>
+        </inlinemediaobject>
     </refsection>
     <refsection role="see also">
         <title>参照</title>
index 090cc0f..1e3db77 100644 (file)
@@ -2,8 +2,8 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA
- *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2021 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="colormap" xml:lang="pt">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:id="colormap" xml:lang="pt">
     <refnamediv>
         <refname>colormap</refname>
         <refpurpose>mapa de cores</refpurpose>
@@ -29,7 +32,7 @@
         </para>
         <para>De início, 32 cores são definidas no mapa de cores. Você pode
             modificar o mapa de cores de uma figura através da opção
-            <literal>set(f,"color_map",cmap)</literal> onde <literal>f</literal> é o
+            <literal>f.color_map=cmap</literal> onde <literal>f</literal> é o
             manipulador da figura.
         </para>
         <para>Cada cor no mapa de cores possui um identificador que você deve
             visualizar os identificadores, use a função <link linkend="getcolor">getcolor</link>.
         </para>
         <para>
-            As funções <link linkend="hotcolormap">hotcolormap</link>, <link linkend="jetcolormap">jetcolormap</link> e <link linkend="graycolormap">graycolormap</link> fornecem mapas de cores com
-            variação contínua de cores.
+            A set of functions from <link linkend="autumncolormap">autumncolormap(n)</link>
+            to <link linkend="wintercolormap">wintercolormap(n)</link> provide swatches that can be
+            set to colormaps. They are illustrated here-below.
+        </para>
+        <para>
+            The colormap of the current figure can be retrieved with <literal>cmap = gcf().color_map</literal>.
         </para>
-        <para>Você pode obter o mapa de cores padrão através de
-            <literal>cmap=get(sdf(),"color_map")</literal>.
+        <para>
+            The current default colormap can be retrieved with <literal>cmap = gdf().color_map</literal>.
+        </para>
+        <para>
+            The factory default colormap can be retrieved with <literal>cmap = sdf().color_map</literal>.
         </para>
     </refsection>
     <refsection>
+        <title>Sample</title>
+        <scilab:image localized="true">
+            cm = ["autumn" "bone" "cool" "copper" "gray" "hot" "hsv" "jet" "ocean" ..
+                  "parula" "pink" "rainbow" "spring" "summer" "white" "winter"];
+
+            ncm = size(cm,"*");
+            indices = [];
+            cmap = [];
+            for i = 0:ncm-1
+                indices = [indices ; (1:100)+i*100];
+                execstr("cols = "+cm(i+1)+"colormap(100);");
+                cmap = [cmap ; cols];
+            end
+            f = gcf();
+            clf
+            f.color_map = cmap;
+            Matplot(indices)
+
+            xgrid([color("grey50") -1]);
+            gca().grid_position = "foreground";
+
+            title(_("Available swatches: #colormap(100)"), "fontsize", 4);
+            xlabel(_("Colors indices in [1,100]"), "fontsize", 3);
+            gca().y_ticks = tlist(["ticks" "locations" "labels"],16:-1:1,cm);
+            set(gca(), "font_size", 2, "sub_ticks",[4 0], "margins", [0.12 0.05 0.08 0.08]);
+
+            gcf().axes_size = [650 650];
+        </scilab:image>
+    </refsection>
+    <refsection>
         <title>Exemplos</title>
         <programlisting role="example"><![CDATA[
-n=64;
-r=linspace(0,1,n)';
-g=linspace(1,0,n)';
-b=ones(r);
-cmap=[r g b];
+n = 64;
+r = linspace(0,1,n)';
+g = linspace(1,0,n)';
+b = ones(r);
+cmap = [r g b];
 f=gcf(); f.color_map=cmap;
 plot3d1()
-f.color_map=get(sdf(),"color_map");
- ]]></programlisting>
+f.color_map = gdf().color_map; // restore to the default colormap
+     ]]></programlisting>
+        <para/>
+        <programlisting role="example"><![CDATA[
+gdf().color_map
+     ]]></programlisting>
+        <screen><![CDATA[
+--> gdf().color_map
+ ans  =
+   0.          0.          0.
+   0.          0.          1.
+   0.          1.          0.
+   0.          1.          1.
+   1.          0.          0.
+   1.          0.          1.
+   1.          1.          0.
+   1.          1.          1.
+   0.          0.          0.5647059
+   0.          0.          0.6901961
+   0.          0.          0.8156863
+   0.5294118   0.8078431   1.
+   0.          0.5647059   0.
+   0.          0.6901961   0.
+   0.          0.8156863   0.
+   0.          0.5647059   0.5647059
+   0.          0.6901961   0.6901961
+   0.          0.8156863   0.8156863
+   0.5647059   0.          0.
+   0.6901961   0.          0.
+   0.8156863   0.          0.
+   0.5647059   0.          0.5647059
+   0.6901961   0.          0.6901961
+   0.8156863   0.          0.8156863
+   0.5019608   0.1882353   0.
+   0.627451    0.2509804   0.
+   0.7529412   0.3764706   0.
+   1.          0.5019608   0.5019608
+   1.          0.627451    0.627451
+   1.          0.7529412   0.7529412
+   1.          0.8784314   0.8784314
+   1.          0.8431373   0.
+]]></screen>
     </refsection>
     <refsection role="see also">
         <title>Ver Também</title>
@@ -111,6 +191,9 @@ f.color_map=get(sdf(),"color_map");
             <member>
                 <link linkend="getcolor">getcolor</link>
             </member>
+            <member>
+                <link linkend="colordef">colordef</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index 2d74ff9..a10a4b3 100644 (file)
@@ -616,7 +616,11 @@ colorbar_6.png=f45bccb9441fd558c25f8ff3e2a84d3b
 colordef_1.png=b862d25fe3199de144cb45c810a43085
 colordef_2.png=8dffacb993e0972367eaabb29383154f
 colordef_3.png=d2d2bbfdf2fa2104f8c2fae819d48c49
-colormap_1.png=34ff30f6dc35ee879709c132e444cf23
+colormap_en_US_1.png=663f40455aa64c1e47b478a0f5a3ec69
+colormap_fr_FR_1.png=663f40455aa64c1e47b478a0f5a3ec69
+colormap_ja_JP_1.png=663f40455aa64c1e47b478a0f5a3ec69
+colormap_pt_BR_1.png=663f40455aa64c1e47b478a0f5a3ec69
+colormap_ru_RU_1.png=663f40455aa64c1e47b478a0f5a3ec69
 contour2d_1.png=ca9b620f09fbcc77799e2286b6730e2d
 contour2d_2.png=e618038e4b44d84ce4b6ae2fe5420951
 contour2d_en_US_3.png=b210ca5f70b33677912b389f9712db1a
diff --git a/scilab/modules/helptools/images/colormap_1.png b/scilab/modules/helptools/images/colormap_1.png
deleted file mode 100644 (file)
index febf194..0000000
Binary files a/scilab/modules/helptools/images/colormap_1.png and /dev/null differ
diff --git a/scilab/modules/helptools/images/colormap_en_US_1.png b/scilab/modules/helptools/images/colormap_en_US_1.png
new file mode 100644 (file)
index 0000000..f4c5370
Binary files /dev/null and b/scilab/modules/helptools/images/colormap_en_US_1.png differ
diff --git a/scilab/modules/helptools/images/colormap_fr_FR_1.png b/scilab/modules/helptools/images/colormap_fr_FR_1.png
new file mode 100644 (file)
index 0000000..f4c5370
Binary files /dev/null and b/scilab/modules/helptools/images/colormap_fr_FR_1.png differ
diff --git a/scilab/modules/helptools/images/colormap_ja_JP_1.png b/scilab/modules/helptools/images/colormap_ja_JP_1.png
new file mode 100644 (file)
index 0000000..f4c5370
Binary files /dev/null and b/scilab/modules/helptools/images/colormap_ja_JP_1.png differ
diff --git a/scilab/modules/helptools/images/colormap_pt_BR_1.png b/scilab/modules/helptools/images/colormap_pt_BR_1.png
new file mode 100644 (file)
index 0000000..f4c5370
Binary files /dev/null and b/scilab/modules/helptools/images/colormap_pt_BR_1.png differ
diff --git a/scilab/modules/helptools/images/colormap_ru_RU_1.png b/scilab/modules/helptools/images/colormap_ru_RU_1.png
new file mode 100644 (file)
index 0000000..f4c5370
Binary files /dev/null and b/scilab/modules/helptools/images/colormap_ru_RU_1.png differ
diff --git a/scilab/modules/helptools/images/uigetcolor_1.png b/scilab/modules/helptools/images/uigetcolor_1.png
new file mode 100644 (file)
index 0000000..b660018
Binary files /dev/null and b/scilab/modules/helptools/images/uigetcolor_1.png differ
diff --git a/scilab/modules/helptools/images/uigetcolor_RGB.png b/scilab/modules/helptools/images/uigetcolor_RGB.png
new file mode 100644 (file)
index 0000000..6693870
Binary files /dev/null and b/scilab/modules/helptools/images/uigetcolor_RGB.png differ