* xclear() tagged as obsolete. Will be removed for Scilab 5.5.0. 54/9954/7
Sylvestre Ledru [Thu, 6 Dec 2012 17:21:48 +0000 (18:21 +0100)]
  Use clf()

Change-Id: If8fbc19933e6bd94a36e125c0bdce3d26f1dbb69

16 files changed:
scilab/CHANGES
scilab/modules/graphics/help/en_US/Graphics.xml
scilab/modules/graphics/help/en_US/xclear.xml [deleted file]
scilab/modules/graphics/help/fr_FR/Graphics.xml
scilab/modules/graphics/help/fr_FR/xclear.xml [deleted file]
scilab/modules/graphics/help/ja_JP/Graphics.xml
scilab/modules/graphics/help/ja_JP/xclear.xml [deleted file]
scilab/modules/graphics/help/pt_BR/Graphics.xml
scilab/modules/graphics/help/pt_BR/xclear.xml [deleted file]
scilab/modules/graphics/help/ru_RU/Graphics.xml
scilab/modules/graphics/help/ru_RU/xclear.xml [deleted file]
scilab/modules/graphics/locales/graphics.pot
scilab/modules/graphics/macros/xclear.sci [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_502.dia.ref
scilab/modules/graphics/tests/nonreg_tests/bug_502.tst
scilab/modules/helptools/data/configuration/scilab_macros.txt

index 74e6c66..a8db4cb 100644 (file)
@@ -287,6 +287,8 @@ Removed Functions
 
 * extract_help_examples has been removed. (Undocumented and based on former help format).
 
+* xclear has been removed. Please use clf instead.
+
 * Symbolic module functions have been removed:
   - addf
   - cmb_lin
index 823f1d9..f0be51d 100644 (file)
@@ -2,7 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA
- * 
+ *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xclear">xclear</link>
-                </term>
-                <listitem>
-                    <para>
-                        Clear a graphics window
-                        <warning>
-                            Function <function>xclear</function> is obsolete.
-                        </warning>
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="driver">driver</link>
                 </term>
                 <listitem>
diff --git a/scilab/modules/graphics/help/en_US/xclear.xml b/scilab/modules/graphics/help/en_US/xclear.xml
deleted file mode 100644 (file)
index 55176eb..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) ENPC - Jean-Philippe Chancelier
- * 
- * 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="en" xml:id="xclear">
-    <refnamediv>
-        <refname>xclear</refname>
-        <refpurpose>
-            clears a graphics window. <emphasis role="bold">This function is obsolete.</emphasis>
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Syntax</title>
-        <synopsis>xclear([window-id])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>window-id</term>
-                <listitem>
-                    <para>an integer scalar or vector.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Without any argument, this function clears the current graphic figure
-            by turning its visibility to <literal>'off'</literal>. Otherwise it
-            clears the graphics figures whose numbers are included in the vector
-            <varname>window-id</varname>. For example <code>xclear(1:3)</code>
-            clears windows 1, 2 and 3. If one of the windows does not
-            exist, then it is automatically created.
-        </para>
-        <para>
-            <warning>
-                Function <function>xclear</function> is obsolete.
-            </warning>
-            To clear a figure, please use instead the <function>clf</function> function or the <literal>visible</literal> property.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
-plot2d();
-scf();
-plot3d();
-xclear(0); // clear the first graphic
-xclear(); // clear the current figure
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See Also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="clf">clf</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index 9b2edd1..21f9ca5 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xclear">xclear</link>
-                </term>
-                <listitem>
-                    <para>efface une fenêtre graphique</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="driver">driver</link>
                 </term>
                 <listitem>
diff --git a/scilab/modules/graphics/help/fr_FR/xclear.xml b/scilab/modules/graphics/help/fr_FR/xclear.xml
deleted file mode 100644 (file)
index eef8f1b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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="fr" xml:id="xclear">
-    <refnamediv>
-        <refname>xclear</refname>
-        <refpurpose>efface une fenêtre graphique.</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Séquence d'appel</title>
-        <synopsis>xclear([window-id])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Paramètres</title>
-        <variablelist>
-            <varlistentry>
-                <term>window-id  </term>
-                <listitem>
-                    <para>entier ou vecteur d'entiers
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Sans argument, cette fonction efface la figure graphique courante en rendant invisible ses enfants..
-            Sinon elle efface les fenêtres graphiques dont les numéros sont donnés dans le vecteur <literal>window-id</literal>. Par exemple <literal>xclear(1:3)</literal> efface les fenêtres 1, 2 et 3.
-            Si une des fenêtres n'existe pas, elle est automatiquement créée.
-        </para>
-        <para>
-            La fonction <literal>xclear</literal> est obsolète.
-            Pour effacer une figure graphique, la fonction <literal>clf</literal> ou la prorpiété <literal>visible</literal> peuvent être utilisées.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>Voir aussi</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="clf">clf</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index f95e11e..134d2c4 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xclear">xclear</link>
-                </term>
-                <listitem>
-                    <para>
-                        グラフィックウインドウをクリア
-                        <warning>
-                            関数 <function>xclear</function> は廃止されました.
-                        </warning>
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="driver">driver</link>
                 </term>
                 <listitem>
diff --git a/scilab/modules/graphics/help/ja_JP/xclear.xml b/scilab/modules/graphics/help/ja_JP/xclear.xml
deleted file mode 100644 (file)
index be7e908..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
- * Copyright (C) ENPC - Jean-Philippe Chancelier
-
- * 
-
-
- * 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="xclear">
-    
-    <refnamediv>
-        
-        <refname>xclear</refname>
-        
-        <refpurpose>
-            
-            グラフィックウインドウをクリア.
-            
-            <emphasis role="bold">この関数は廃止されました.</emphasis>
-            
-        </refpurpose>
-        
-    </refnamediv>
-    
-    <refsynopsisdiv>
-        
-        <title>呼び出し手順</title>
-        
-        <synopsis>xclear([window-id])</synopsis>
-        
-    </refsynopsisdiv>
-    
-    <refsection>
-        
-        <title>引数</title>
-        
-        <variablelist>
-            
-            <varlistentry>
-                
-                <term>window-id</term>
-                
-                <listitem>
-                    
-                    <para>整数のスカラーまたはベクトルi</para>
-                    
-                </listitem>
-                
-            </varlistentry>
-            
-        </variablelist>
-        
-    </refsection>
-    
-    <refsection>
-        
-        <title>説明</title>
-        
-        <para>
-            
-            引数を指定しない場合,この関数は,その可視属性を 'off' にすることにより
-            
-            カレントのグラフィック図をクリアします.
-            
-            その他の場合,ベクトル<literal>window-id</literal>に含まれる
-            
-            番号のグラフィック図をクリアします.
-            
-            例えば <literal>xclear(1:3)</literal> はウインドウ 1,2 および3をクリアします.
-            
-            ウインドウの一つが存在しない場合,自動的に作成されます.
-            
-        </para>
-        
-        <para>
-            
-            <warning>
-                
-                関数 <function>xclear</function> は廃止されました.
-                
-            </warning>
-            
-            図をクリアするには,代わりに<literal>clf</literal> 関数または
-            
-            <literal>visible</literal>プロパティを使用してください.
-            
-        </para>
-        
-    </refsection>
-    
-    <refsection>
-        
-        <title>例</title>
-        
-        <programlisting role="example"><![CDATA[ 
-
-plot2d();
-
-scf();
-
-plot3d();
-
-xclear(0); // clear the first graphic
-
-xclear(); // clear the current figure
-
- ]]></programlisting>
-        
-    </refsection>
-    
-    <refsection role="see also">
-        
-        <title>参照</title>
-        
-        <simplelist type="inline">
-            
-            <member>
-                
-                <link linkend="clf">clf</link>
-                
-            </member>
-            
-        </simplelist>
-        
-    </refsection>
-    
-</refentry>
-
index ec2e210..2bc219e 100644 (file)
@@ -2,7 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA
- * 
+ *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
         <title>Primitivas gráficas</title>
         <variablelist>
             <varlistentry>
-                <term>xclear</term>
-                <listitem>
-                    <para>limpa janela de gráficos</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
                 <term>driver</term>
                 <listitem>
                     <para>seleciona um driver gráfico</para>
diff --git a/scilab/modules/graphics/help/pt_BR/xclear.xml b/scilab/modules/graphics/help/pt_BR/xclear.xml
deleted file mode 100644 (file)
index d2af61f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) ENPC - Jean-Philippe Chancelier
- * 
- * 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:ns3="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="xclear" xml:lang="en">
-    <refnamediv>
-        <refname>xclear</refname>
-        <refpurpose>limpa janela de gráficos</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>xclear([window-id])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>window-id</term>
-                <listitem>
-                    <para>vetor de inteiros ou escalar inteiro</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Descrição</title>
-        <para>Sem argumentos, esta função limpa a figura corrente ajustando a sua
-            propriedade visible para 'off'. Em caso contrário, ela limpa as janelas
-            cujos números estão inclusos no vetor <literal>window-id</literal>. Por
-            exemplo <literal>xclear(1:3)</literal> limpa as janelas 1, 2 e 3. Se uma
-            dessas janelas não existir, então ela é automaticamente criada.
-        </para>
-        <para>
-            A função <literal>xclear</literal> está obsoleta. Para limpar uma
-            figura, por favor, utilize a função <literal>clf</literal> ao invés, ou a
-            propriedade <literal>visible</literal>.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="clf">clf</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index c106140..12df18d 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xclear">xclear</link>
-                </term>
-                <listitem>
-                    <para>
-                        Очистка графического окна
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>
                     <link linkend="driver">driver</link>
                 </term>
                 <listitem>
diff --git a/scilab/modules/graphics/help/ru_RU/xclear.xml b/scilab/modules/graphics/help/ru_RU/xclear.xml
deleted file mode 100644 (file)
index 6c8bdd7..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) ENPC - Jean-Philippe Chancelier
- * 
- * 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="ru" xml:id="xclear">
-    <refnamediv>
-        <refname>xclear</refname>
-        <refpurpose>
-            очищает графическое окно. <emphasis role="bold">Эта функция устарела.</emphasis>
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Последовательность вызова</title>
-        <synopsis>xclear([window-id])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Аргументы</title>
-        <variablelist>
-            <varlistentry>
-                <term>window-id</term>
-                <listitem>
-                    <para>целочисленный скаляр или вектор.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            Без входного аргумента эта функция очищает текущее графическое окно
-            путём переключения его видимости в положение <literal>'off'</literal>.
-            В противном случае она очищает те графические окна, чьи номера
-            включены в вектор <varname>window-id</varname>. Например,
-            <code>xclear(1:3)</code> очищает окна 1, 2 и 3. Если одно из окон не
-            существует, то оно будет автоматически создано.
-        </para>
-        <para>
-            <warning>
-                Функция <function>xclear</function> устарела.
-            </warning>
-            Чтобы очистить графическое окно, пожалуйста, используйте функцию
-            <function>clf</function> или свойство видимости
-            <literal>visible</literal>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[ 
-plot2d();
-scf();
-plot3d();
-xclear(0); // очистить первый график
-xclear(); // очистить текущее графическое окно
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Смотрите также</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="clf">clf</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index 7322095..8f21107 100644 (file)
@@ -4362,12 +4362,6 @@ msgid "%s: Wrong type for input argument #%d: Scalar expected.\n"
 msgstr ""
 
 #
-# File: modules/graphics/macros/xclear.sci, line: 28
-#, c-format
-msgid "%s: Wrong type for input argument #%d: A vector expected.\n"
-msgstr ""
-
-#
 # File: modules/graphics/macros/xload.sci, line: 19
 #, c-format
 msgid "%s: file %s does not exist.\n"
diff --git a/scilab/modules/graphics/macros/xclear.sci b/scilab/modules/graphics/macros/xclear.sci
deleted file mode 100644 (file)
index ad7dfd4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) ENPC
-// 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.
-
-function xclear(win_num)
-    //xclear([win_num])
-    // Clear the graphic window win_num and erase the recorded graphics of
-    // window win_num
-    // if win_num is omited, it's the current graphic window
-    // win_num can also be a vector of window Id to clear a set of windows
-    //!
-
-
-    [lhs,rhs]=argn(0);
-    if (rhs == 0) then
-        // clear the current figure
-        set(gcf(), "visible", "off");
-    elseif (rhs == 1) then
-        // clear a set of figures
-        if (type(win_num) <> 1) then
-            error(999, msprintf(gettext("%s: Wrong type for input argument #%d: A vector expected.\n"), "xclear", 1));
-            return;
-        end
-
-        if (winsid() == []) then
-            // no current figure
-            curFig = [];
-        else
-            curFig = gcf();
-        end
-
-        for figNum = win_num,
-            set(scf(figNum), "visible", "off");
-        end
-
-        // restore current figure
-        if (curFig <> []) then
-            scf(curFig);
-        end
-
-    else
-        error(999, msprintf(gettext("%s: Wrong number of input arguments: %d or %d expected.\n"), "xclear", 0, 1));
-        return;
-    end
-endfunction
-
index 12285f4..ee9dd1e 100644 (file)
@@ -37,6 +37,4 @@
 x = -25:0.1:25;
 y = x.^2;
 plot2d(x,y);
-if execstr("for k=1:20,xclear(),sleep(100),end","errcatch","n") <>0 then bugmes();quit;end
-xdel();
+if execstr("for k=1:20,clf(),sleep(100),end","errcatch","n") <>0 then bugmes();quit;end
index 03ae7f0..5ca7783 100644 (file)
@@ -42,6 +42,4 @@
 x = -25:0.1:25;
 y = x.^2;
 plot2d(x,y);
-if execstr("for k=1:20,xclear(),sleep(100),end","errcatch","n") <>0 then pause,end
-xdel();
-
+if execstr("for k=1:20,clf(),sleep(100),end","errcatch","n") <>0 then pause,end