* Bug 12356 fixed: colordef('default') missed 27/19527/4
Samuel GOUGEON [Tue, 31 Oct 2017 18:16:24 +0000 (19:16 +0100)]
  * http://bugzilla.scilab.org/12356
  * new proposed colordef page (PDF):
    http://bugzilla.scilab.org/attachment.cgi?id=4603

Change-Id: I748e4f01787c178be8b01451229c7bc71b6f021f

scilab/CHANGES.md
scilab/modules/graphics/help/en_US/color_management/colordef.xml
scilab/modules/graphics/help/ja_JP/color_management/colordef.xml [deleted file]
scilab/modules/graphics/help/pt_BR/color_management/colordef.xml [deleted file]
scilab/modules/graphics/macros/colordef.sci
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/colordef_1.png [new file with mode: 0644]
scilab/modules/helptools/images/colordef_2.png [new file with mode: 0644]
scilab/modules/helptools/images/colordef_3.png [new file with mode: 0644]

index 84890b6..6ac4668 100644 (file)
@@ -237,7 +237,8 @@ Help pages:
 * fixed / improved:  `members`, `part`, `ode`, `ode_optional_output`, `ode_roots`, `plot2d`, `roots`,
   `printf`, `sprintf`, `iconvert`, `stdev`, `xlabel`, `and_op`, `or_op`, `permute`, `tree2code`, `%helps`,
   `scilab|scilex`, `flipdim`, `Matplot_properties`, `meshgrid`, `ismatrix`, `xget`, `xset`, `ieee`, `evstr`,
-  `uigetfont`, `uigetdir`, `uigetfile`, `uiputfile`, `cat`, `makecell`, `xstring`, `norm`, `barhomogenize`
+  `uigetfont`, `uigetdir`, `uigetfile`, `uiputfile`, `cat`, `makecell`, `xstring`, `norm`, `barhomogenize`,
+  `colordef`
 * rewritten: `consolebox`, `double`, `isoview`, `pixel_drawing_mode`, `householder`, `or`, `|,||`,
  `and`, `&,&&`, `format`, `typeof`, `brackets`, `setlanguage`, `sleep`, `isinf`, `unique`,
  `bitor`, `bitxor`, `bitand`, `macr2tree`, `geomean`, `clf`, `getPreferencesValue`, `gcd`, `isglobal`,
@@ -405,6 +406,7 @@ the [development mailing list](dev@lists.scilab.org) for a particular toolbox.
 * [#11756](http://bugzilla.scilab.org/show_bug.cgi?id=11756): In the categories of the ATOMS GUI, actually available modules might be not listed.
 * [#11767](http://bugzilla.scilab.org/show_bug.cgi?id=11767): `execstr("A. 1","errcatch")` failed to catch the error.
 * [#12195](http://bugzilla.scilab.org/show_bug.cgi?id=12195): `generateBlockImage` sometimes changed the current graphic driver.
+* [#12356](http://bugzilla.scilab.org/show_bug.cgi?id=12356): `colordef` did not allow to reset colors to the default default ones.
 * [#12372](http://bugzilla.scilab.org/show_bug.cgi?id=12372): The `mode` function was poorly documented.
 * [#12586](http://bugzilla.scilab.org/show_bug.cgi?id=12586): An example showing how to get XML comments was missing in the `xmlXPath` help page.
 * [#12771](http://bugzilla.scilab.org/show_bug.cgi?id=12771): xcosPalGenerateAllIcons help example was broken.
index 8ed243b..4d811e0 100644 (file)
@@ -2,6 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Serge Steer
+ * Copyright (C) 2017 - Samuel GOUGEON
  *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * 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="colordef">
+<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="colordef">
     <refnamediv>
         <refname>colordef</refname>
-        <refpurpose>Set default color values to display different color schemes</refpurpose>
+        <refpurpose>Set the color look-and-feel of a given or of all forthcoming graphic figures</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>colordef(color_scheme)
-            colordef(f,color_scheme)
-            colordef('new',color_scheme)
+        <synopsis>
+            colordef(color_scheme)
+            colordef(f, color_scheme)
+            colordef("new", color_scheme)
+            colordef default
         </synopsis>
     </refsynopsisdiv>
     <refsection>
             <varlistentry>
                 <term>color_scheme</term>
                 <listitem>
-                    <para>a character string with possible value: 'white', 'black','none'
+                    <para>
+                    a character string with possible value: <literal>'white'</literal>,
+                    <literal>'black'</literal>, <literal>'none'</literal>, or
+                    <literal>'default'</literal>.
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>f</term>
                 <listitem>
-                    <para>a handle on a graphic figure
+                    <para>handle on a graphic figure
                     </para>
                 </listitem>
             </varlistentry>
     </refsection>
     <refsection>
         <title>Description</title>
-        <itemizedlist>
-            <listitem>
-                <para>
-                    <literal>colordef('white')</literal> sets the default figure (see
-                    <link linkend="gdf">gdf</link>) colormap to <literal>jetcolormap(64)</literal>, the
-                    default figure background color to
-                    light gray and the default axes (see <link linkend="gda">gda</link>) background
-                    color to white, the axes lines foreground and font color to black.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('black')</literal> sets the default figure (see
-                    <link linkend="gdf">gdf</link>) colormap to <literal>jetcolormap(64)</literal>, the
-                    default figure  background color to dark gray and the default axes
-                    (see <link linkend="gda">gda</link>) background color to black, the axes lines
-                    foreground and font color to white.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('none')</literal> sets the default figure (see
-                    <link linkend="gdf">gdf</link>)  colormap to <literal>hsvcolormap(64)</literal>, the
-                    default figure  background color to dark gray and the default axes
-                    (see <link linkend="gda">gda</link>) background color to black, the axes lines
-                    foreground and font color to white.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef(f,color_scheme)</literal> sets the color  properties of  figure given by the
-                    handle <literal>f</literal> as well as the color properties of its current axes.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('new',color_scheme)</literal> creates a new graphic window
-                    and its color properties as well as the properties of its  axes.
-                </para>
-            </listitem>
-        </itemizedlist>
+        <para>
+            <literal>colordef(color_scheme)</literal> sets the color properties of all forthcoming
+            figures and of their axes. The <literal>color_scheme</literal> and corresponding colors
+            are listed in the table here-below.
+        </para>
+        <para>
+            <table border="1">
+                <tr><td>color_scheme</td>  <th>'white'</th>      <th>'black'</th>        <th>'none'</th></tr>
+                <tr><td>fig.color_map</td> <td>jetcolormap(64)</td><td>jetcolormap(64)</td><td>hsvcolormap(64)</td></tr>
+                <tr><td>fig.background</td><td>light gray</td>   <td>dark gray</td>      <td>dark gray</td></tr>
+                <tr><td>axes.background</td><td>white</td>       <td>black</td>          <td>black</td></tr>
+                <tr><td>axes.foreground</td><td>black</td>       <td>white</td>          <td>white</td></tr>
+            </table>
+        </para>
+        <para>
+            After having used <literal>colordef(color_scheme)</literal>, it is possible to get back
+            the default default colors with <literal>colordef("default")</literal>.
+        </para>
+        <para>
+            <literal>colordef(f, color_scheme)</literal> sets the color properties corresponding to
+            the chosen color scheme, but only for the chosen figure with handle <literal>f</literal>.
+            The default colors of forthcoming figures are unchanged (except for "default").
+        </para>
+        <para>
+            <literal>colordef('new', color_scheme)</literal> creates a new graphic window and sets
+            its color properties according to the chosen <literal>color_scheme</literal>.
+            The default colors of forthcoming figures are unchanged (except for "default").
+        </para>
     </refsection>
     <refsection>
         <title>Examples</title>
-        <programlisting role="example"><![CDATA[
- ]]></programlisting>
+        <table>
+        <tr>
+            <td>
+                <programlisting role="example"><![CDATA[
+                colordef("black")
+                plot()
+                 ]]></programlisting>
+                <scilab:image>
+                colordef("black")
+                plot()
+                title("colordef(""black"")")
+                gcf().figure_size = [350 400];
+                </scilab:image>
+            </td>
+            <td>
+                <programlisting role="example"><![CDATA[
+                colordef("white")
+                plot()
+                 ]]></programlisting>
+                <scilab:image>
+                colordef("white")
+                plot()
+                title("colordef(""white"")")
+                gcf().figure_size = [350 400];
+                </scilab:image>
+            </td>
+            <td>
+                <programlisting role="example"><![CDATA[
+                colordef("default")
+                plot()
+                 ]]></programlisting>
+                <scilab:image>
+                colordef("default")
+                plot()
+                title("colordef(""default"")")
+                gcf().figure_size = [350 400];
+                </scilab:image>
+            </td>
+        </tr>
+        </table>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="gdf"> gdf</link>
+                <link linkend="sdf">sdf</link>
             </member>
             <member>
-                <link linkend="gda"> gda</link>
+                <link linkend="gdf">gdf</link>
             </member>
             <member>
-                <link linkend="figure_properties"> figure_properties</link>
+                <link linkend="sda">sda</link>
             </member>
             <member>
-                <link linkend="axes_properties"> axes_properties</link>
+                <link linkend="gda">gda</link>
+            </member>
+            <member>
+                <link linkend="figure_properties">figure_properties</link>
+            </member>
+            <member>
+                <link linkend="axes_properties">axes_properties</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    "default" color_scheme introduced.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
diff --git a/scilab/modules/graphics/help/ja_JP/color_management/colordef.xml b/scilab/modules/graphics/help/ja_JP/color_management/colordef.xml
deleted file mode 100644 (file)
index b0c150f..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
- * Copyright (C) INRIA - Serge Steer
-
- *
-
-
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * 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.
- * This file was originally licensed under the terms of the CeCILL v2.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="colordef">
-
-    <refnamediv>
-
-        <refname>colordef</refname>
-
-        <refpurpose>異なる色スキームで表示するためのデフォルト色の値を設定する</refpurpose>
-
-    </refnamediv>
-
-    <refsynopsisdiv>
-
-        <title>呼び出し手順</title>
-
-        <synopsis>colordef(color_scheme)
-
-            colordef(f,color_scheme)
-
-            colordef('new',color_scheme)
-
-        </synopsis>
-
-    </refsynopsisdiv>
-
-    <refsection>
-
-        <title>引数</title>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>color_scheme</term>
-
-                <listitem>
-
-                    <para>文字列で, 以下の値を指定: 'white', 'black','none'
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>f</term>
-
-                <listitem>
-
-                    <para>グラフィック図のハンドル
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-    </refsection>
-
-    <refsection>
-
-        <title>説明</title>
-
-        <itemizedlist>
-
-            <listitem>
-
-                <para>
-
-                    <literal>colordef('white')</literal> は,デフォルトの
-
-                    図(<link linkend="gdf">gdf</link>参照)カラーマップを
-
-                    <literal>jetcolormap(64)</literal>,
-
-                    デフォルトの図の背景色をライトグレー, デフォルトの軸 (<link linkend="gda">gda</link>参照)
-
-                    背景色を白, 軸の線の前景色とフォントの色を黒に設定します.
-
-                </para>
-
-            </listitem>
-
-            <listitem>
-
-                <para>
-
-                    <literal>colordef('black')</literal> は,デフォルトの
-
-                    図(<link linkend="gdf">gdf</link>参照)カラーマップを
-
-                    <literal>jetcolormap(64)</literal>,
-
-                    デフォルトの図の背景色をダークグレー, デフォルトの軸 (<link linkend="gda">gda</link>参照)
-
-                    背景色を黒, 軸の線の前景色とフォントの色を白に設定します.
-
-                </para>
-
-            </listitem>
-
-            <listitem>
-
-                <para>
-
-                    <literal>colordef('none')</literal> は,デフォルトの
-
-                    図(<link linkend="gdf">gdf</link>参照)カラーマップを
-
-                    <literal>hsvcolormap(64)</literal>,
-
-                    デフォルトの図の背景色をダークグレー, デフォルトの軸 (<link linkend="gda">gda</link>参照)
-
-                    背景色を黒, 軸の線の前景色とフォントの色を白に設定します.
-
-                </para>
-
-            </listitem>
-
-            <listitem>
-
-                <para>
-
-                    <literal>colordef(f,color_scheme)</literal> はハンドル<literal>f</literal>
-
-                    で指定した図の色プロパティを設定し,同時に
-
-                    そのカレントの軸の色プロパティも設定します.
-
-                </para>
-
-            </listitem>
-
-            <listitem>
-
-                <para>
-
-                    <literal>colordef('new',color_scheme)</literal> は,新しいグラフィックウインドウおよび
-
-                    その色プロパティを軸プロパティと共に作成します.
-
-                </para>
-
-            </listitem>
-
-        </itemizedlist>
-
-    </refsection>
-
-    <refsection>
-
-        <title>例</title>
-
-        <programlisting role="example"><![CDATA[
-
- ]]></programlisting>
-
-    </refsection>
-
-    <refsection role="see also">
-
-        <title>参照</title>
-
-        <simplelist type="inline">
-
-            <member>
-
-                <link linkend="gdf"> gdf</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="gda"> gda</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="figure_properties"> figure_properties</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="axes_properties"> axes_properties</link>
-
-            </member>
-
-        </simplelist>
-
-    </refsection>
-
-</refentry>
-
diff --git a/scilab/modules/graphics/help/pt_BR/color_management/colordef.xml b/scilab/modules/graphics/help/pt_BR/color_management/colordef.xml
deleted file mode 100644 (file)
index dc76ea5..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) INRIA - Serge Steer
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * 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.
- * This file was originally licensed under the terms of the CeCILL v2.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:ns5="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="colordef" xml:lang="pt">
-    <refnamediv>
-        <refname>colordef</refname>
-        <refpurpose>Ajusta os valores de cor padrões para exibição de diferentes
-            esquemas de cores
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>colordef(color_scheme)
-            colordef(f,color_scheme)
-            colordef('new',color_scheme)
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>color_scheme</term>
-                <listitem>
-                    <para>string com valores possíveis: 'white', 'black','none' </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>f</term>
-                <listitem>
-                    <para>manipulador para uma figura gráfica </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Descrição</title>
-        <itemizedlist>
-            <listitem>
-                <para>
-                    <literal>colordef('white')</literal> ajusta o mapa de cores
-                    padrão da figura (ver <link linkend="gdf">gdf</link>) para
-                    <literal>jetcolormap(64)</literal>, a cor de plano de fundo padrão da
-                    figura para cinza claro, a cor de plano de fundo dos eixos (ver <link linkend="gda">gda</link>) para branco e as cores de primeiro plano da
-                    fonte e das linhas dos eixos para preto.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('black')</literal> ajusta o mapa de cores
-                    padrão da figura (ver <link linkend="gdf">gdf</link>) para
-                    <literal>jetcolormap(64)</literal>, a cor de plano de fundo padrão da
-                    figura para cinza escuro, a cor de plano de fundo dos eixos (ver <link linkend="gda">gda</link>) para preto e as cores de primeiro plano da
-                    fonte e das linhas dos eixos para branco.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('none')</literal> ajusta o mapa de cores
-                    padrão da figura (ver <link linkend="gdf">gdf</link>) para
-                    <literal>hsvcolormap(64)</literal>, a cor de plano de fundo padrão da
-                    figura para cinza escuro a cor de plano de fundo dos eixos (ver <link linkend="gda">gda</link>) para preto e as cores de primeiro plano da
-                    fonte e das linhas dos eixos para branco.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef(f,color_scheme)</literal> ajusta as
-                    propriedades de cor da figura fornecida pelo manipulador
-                    <literal>f</literal> tanto quanto as propriedades de cor de seus eixos
-                    correntes.
-                </para>
-            </listitem>
-            <listitem>
-                <para>
-                    <literal>colordef('new',color_scheme)</literal> cria uma nova
-                    janela de gráficos e ajusta suas propriedades de cor bem como as
-                    propriedades de seus eixos.
-                </para>
-            </listitem>
-        </itemizedlist>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[
-// Adicionar aqui instruções Scilab e comentários
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="gdf"> gdf</link>
-            </member>
-            <member>
-                <link linkend="gda"> gda</link>
-            </member>
-            <member>
-                <link linkend="figure_properties">
-                    figure_properties
-                </link>
-            </member>
-            <member>
-                <link linkend="axes_properties"> axes_properties</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index 32c9324..98fdd39 100644 (file)
@@ -1,5 +1,7 @@
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) INRIA
+// Copyright (C) 2017 - Samuel GOUGEON
+//
 // Copyright (C) 2012 - 2016 - Scilab Enterprises
 //
 // This file is hereby licensed under the terms of the GNU GPL v2.0,
@@ -13,65 +15,86 @@ function colordef(varargin)
     //Set default color values to display different color schemes
 
     if size(varargin)<1 | size(varargin)>2 then
-        error(msprintf(gettext("%s: Wrong number of input arguments: %d to %d expected.\n"), "colordef", 1, 2));
+        msg = gettext("%s: Wrong number of input arguments: %d to %d expected.\n");
+        error(msprintf(msg, "colordef", 1, 2));
     end
-    a1=varargin(1);
+    a1 = varargin(1);
     if size(varargin) == 1 then //Only one argument
         if type(a1)<>10 then //the first argument should be a string
-            error(msprintf(gettext("%s: Wrong type for input argument #%d: String array expected.\n"), "colordef", 1));
+            msg = gettext("%s: Wrong type for input argument #%d: String array expected.\n");
+            error(msprintf(msg, "colordef", 1));
         end
-        f=gdf(); a=gda();
+        f = gdf();
+        a = gda();
     end
 
     if size(varargin) == 2 then //Two arguments
-        a2=varargin(2);
-        if type(a2)<>10 then //the second argument should be a string
-            error(msprintf(gettext("%s: Wrong type for input argument #%d: String array expected.\n"), "colordef", 2));
+        a2 = varargin(2);
+        if type(a2) <> 10 then //the second argument should be a string
+            msg = gettext("%s: Wrong type for input argument #%d: String array expected.\n");
+            error(msprintf(msg, "colordef", 2));
         end
 
         if type(a1)==9 then //First argument is an handle
-            f=a1;
-            a1=a2;
-            if f.type<>"Figure" then
-                error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"), "colordef", 1,"handle on a figure, ""new"""));
+            f = a1;
+            a1 = a2;
+            if f.type <> "Figure" then
+                msg = gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n");
+                error(msprintf(msg, "colordef", 1,"handle on a figure, ""new"""));
             end
             scf(f);
-            a=gca();
+            a = gca();
         elseif a1=="new" then //First argument is "new"
-            n=winsid();
+            n = winsid();
             if n==[] then
-                n=0;
+                n = 0;
             else
-                n=max(n+1);
+                n = max(n+1);
             end
-            f=scf(n);
-            a=gca();a1=a2;
+            f = scf(n);
+            a = gca();
+            a1 = a2;
         else  //First argument is NOT an handle and is not "new"
-            error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"), "colordef", 1,"handle on a figure, ""new"""));
+            msg = gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n");
+            error(msprintf(msg, "colordef", 1, "handle on a figure, ""new"""));
         end
     end
 
     select convstr(a1)
+    case "default"
+        sdf();
+        sda();
+
     case "white"
-        f.color_map=[jetcolormap(64);[1 1 1]*0.8];
-        f.background=65;
-        a.background=-2;a.foreground=-1;
-        a.font_color=a.foreground;
-        a.mark_foreground=a.foreground;
+        f.color_map = [jetcolormap(64); [1 1 1]*0.8];
+        f.background = 65;
+        a.background = -2;
+        a.foreground = -1;
+        a.font_color = a.foreground;
+        a.mark_foreground = a.foreground;
+
     case "black"
-        if getos() == "Windows" then c=0.2, else c=0.35,end
-        f.color_map=[jetcolormap(64);[1 1 1]*c];
-        f.background=65;
-        a.background=-1;a.foreground=-2;
-        a.font_color=a.foreground;
-        a.mark_foreground=a.foreground;
+        if getos() == "Windows" then
+            c = 0.2
+        else
+            c = 0.35
+        end
+        f.color_map  = [jetcolormap(64); [1 1 1]*c];
+        f.background = 65;
+        a.background = -1;
+        a.foreground = -2;
+        a.font_color = a.foreground;
+        a.mark_foreground = a.foreground;
+
     case "none"
-        f.color_map=[hsvcolormap(64)];
-        f.background=-1;
-        a.background=-1;a.foreground=-2;
-        a.font_color=a.foreground;
-        a.mark_foreground=a.foreground;
+        f.color_map  = [hsvcolormap(64)];
+        f.background = -1;
+        a.background = -1;
+        a.foreground = -2;
+        a.font_color = a.foreground;
+        a.mark_foreground = a.foreground;
     else
-        error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"), "colordef", size(varargin),"""white"", ""black"", ""none"""));
+        msg = gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n");
+        error(msprintf(msg, "colordef", size(varargin),"""default"", ""white"", ""black"", ""none"""));
     end
 endfunction
index 9b8f23d..811b4be 100644 (file)
@@ -855,6 +855,9 @@ colorbar_ja_JP_3.png=1a6ca0174eac3131a98e7958423740ef
 colorbar_ru_RU_1.png=7cc33a9874a2651d43d210e6dcf8f54a
 colorbar_ru_RU_2.png=e44d0795021840a00d2de77c842c8b94
 colorbar_ru_RU_3.png=1a6ca0174eac3131a98e7958423740ef
+colordef_1.png=b862d25fe3199de144cb45c810a43085
+colordef_2.png=8dffacb993e0972367eaabb29383154f
+colordef_3.png=d2d2bbfdf2fa2104f8c2fae819d48c49
 colormap_1.png=34ff30f6dc35ee879709c132e444cf23
 contour2d_1.png=ca9b620f09fbcc77799e2286b6730e2d
 contour2d_2.png=e618038e4b44d84ce4b6ae2fe5420951
diff --git a/scilab/modules/helptools/images/colordef_1.png b/scilab/modules/helptools/images/colordef_1.png
new file mode 100644 (file)
index 0000000..7430a6a
Binary files /dev/null and b/scilab/modules/helptools/images/colordef_1.png differ
diff --git a/scilab/modules/helptools/images/colordef_2.png b/scilab/modules/helptools/images/colordef_2.png
new file mode 100644 (file)
index 0000000..a761485
Binary files /dev/null and b/scilab/modules/helptools/images/colordef_2.png differ
diff --git a/scilab/modules/helptools/images/colordef_3.png b/scilab/modules/helptools/images/colordef_3.png
new file mode 100644 (file)
index 0000000..d0d0dd3
Binary files /dev/null and b/scilab/modules/helptools/images/colordef_3.png differ