* Bug 6765: xdel() is obsolete. Replaced with close() 34/21534/4
Samuel GOUGEON [Sun, 12 Jul 2020 18:48:08 +0000 (20:48 +0200)]
  http://bugzilla.scilab.org/6765

Change-Id: I77c55bd8d83f23356828b77f95f76b184ce62ce6

104 files changed:
scilab/modules/demo_tools/macros/demo_file_choice.sci
scilab/modules/demo_tools/macros/demo_folder_choice.sci
scilab/modules/demo_tools/macros/demo_function_choice.sci
scilab/modules/development_tools/macros/test_run.sci
scilab/modules/development_tools/macros/testexamples.sce
scilab/modules/graphic_objects/tests/unit_tests/gda_userdata.tst
scilab/modules/graphics/help/en_US/2d_plot/plot.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d.xml
scilab/modules/graphics/help/en_US/3d_plot/plot3d.xml
scilab/modules/graphics/help/en_US/3d_plot/surf.xml
scilab/modules/graphics/help/en_US/Graphics.xml
scilab/modules/graphics/help/en_US/axes_operations/gca.xml
scilab/modules/graphics/help/en_US/axes_operations/replot.xml
scilab/modules/graphics/help/en_US/axes_operations/sda.xml
scilab/modules/graphics/help/en_US/figure_operations/pixel_drawing_mode.xml
scilab/modules/graphics/help/en_US/figure_operations/winsid.xml
scilab/modules/graphics/help/en_US/figure_operations/xdel.xml
scilab/modules/graphics/help/en_US/handle/delete.xml
scilab/modules/graphics/help/en_US/load_save/xload.xml
scilab/modules/graphics/help/fr_FR/Graphics.xml
scilab/modules/graphics/help/fr_FR/axes_operations/replot.xml
scilab/modules/graphics/help/fr_FR/figure_operations/pixel_drawing_mode.xml
scilab/modules/graphics/help/fr_FR/figure_operations/winsid.xml
scilab/modules/graphics/help/fr_FR/figure_operations/xdel.xml
scilab/modules/graphics/help/ja_JP/2d_plot/plot.xml
scilab/modules/graphics/help/ja_JP/2d_plot/plot2d.xml
scilab/modules/graphics/help/ja_JP/3d_plot/plot3d.xml
scilab/modules/graphics/help/ja_JP/3d_plot/surf.xml
scilab/modules/graphics/help/ja_JP/Graphics.xml
scilab/modules/graphics/help/ja_JP/axes_operations/gca.xml
scilab/modules/graphics/help/ja_JP/axes_operations/replot.xml
scilab/modules/graphics/help/ja_JP/axes_operations/sda.xml
scilab/modules/graphics/help/ja_JP/figure_operations/winsid.xml
scilab/modules/graphics/help/ja_JP/figure_operations/xdel.xml
scilab/modules/graphics/help/pt_BR/2d_plot/plot.xml
scilab/modules/graphics/help/pt_BR/3d_plot/plot3d.xml
scilab/modules/graphics/help/pt_BR/3d_plot/surf.xml
scilab/modules/graphics/help/pt_BR/Graphics.xml
scilab/modules/graphics/help/pt_BR/axes_operations/gca.xml
scilab/modules/graphics/help/pt_BR/axes_operations/replot.xml
scilab/modules/graphics/help/pt_BR/axes_operations/sda.xml
scilab/modules/graphics/help/pt_BR/figure_operations/winsid.xml
scilab/modules/graphics/help/pt_BR/figure_operations/xdel.xml
scilab/modules/graphics/help/ru_RU/Graphics.xml
scilab/modules/graphics/help/ru_RU/figure_operations/winsid.xml
scilab/modules/graphics/help/ru_RU/figure_operations/xdel.xml
scilab/modules/graphics/macros/xload.sci
scilab/modules/graphics/sci_gateway/c/sci_xdel.c
scilab/modules/graphics/tests/nonreg_tests/bug_1025.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_1025.tst
scilab/modules/graphics/tests/nonreg_tests/bug_11738.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_11738.tst
scilab/modules/graphics/tests/nonreg_tests/bug_15418.tst
scilab/modules/graphics/tests/nonreg_tests/bug_1587.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_1587.tst
scilab/modules/graphics/tests/nonreg_tests/bug_1682.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_1682.tst
scilab/modules/graphics/tests/nonreg_tests/bug_1902.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_1902.tst
scilab/modules/graphics/tests/nonreg_tests/bug_2045.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_2045.tst
scilab/modules/graphics/tests/nonreg_tests/bug_2124.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_2124.tst
scilab/modules/graphics/tests/nonreg_tests/bug_2577.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_2577.tst
scilab/modules/graphics/tests/nonreg_tests/bug_3036.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_3036.tst
scilab/modules/graphics/tests/nonreg_tests/bug_367.tst
scilab/modules/graphics/tests/nonreg_tests/bug_3903.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_3903.tst [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_4221.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_4221.tst
scilab/modules/graphics/tests/nonreg_tests/bug_487.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_487.tst
scilab/modules/graphics/tests/nonreg_tests/bug_5430.tst
scilab/modules/graphics/tests/nonreg_tests/bug_9052.tst
scilab/modules/graphics/tests/nonreg_tests/bug_H.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_H.tst
scilab/modules/graphics/tests/nonreg_tests/bug_surf_deadlock.tst
scilab/modules/graphics/tests/unit_tests/locate.tst
scilab/modules/graphics/tests/unit_tests/swap_handles.dia.ref [deleted file]
scilab/modules/graphics/tests/unit_tests/swap_handles.tst
scilab/modules/graphics/tests/unit_tests/xload.tst
scilab/modules/gui/etc/graphics_menubar.xml
scilab/modules/gui/help/en_US/close.xml
scilab/modules/gui/help/ja_JP/close.xml
scilab/modules/gui/help/ru_RU/close.xml [new file with mode: 0644]
scilab/modules/gui/macros/close.sci
scilab/modules/gui/tests/unit_tests/lookandfeel.tst
scilab/modules/hdf5/tests/nonreg_tests/bug_14886.tst
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/interpolation/tests/nonreg_tests/bug_461.dia.ref [deleted file]
scilab/modules/interpolation/tests/nonreg_tests/bug_461.tst
scilab/modules/m2sci/help/en_US/compatibility_functions/mtlb_close.xml
scilab/modules/m2sci/help/en_US/m2sci_equivalents/c/close.xml
scilab/modules/m2sci/help/fr_FR/compatibility_functions/mtlb_close.xml
scilab/modules/m2sci/help/ru_RU/compatibility_functions/mtlb_close.xml [new file with mode: 0644]
scilab/modules/m2sci/macros/compat_functions/mtlb_close.sci
scilab/modules/m2sci/macros/sci_files/sci_close.sci
scilab/modules/m2sci/tests/unit_tests/conversion/CLOSE.dia.ref
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp
scilab/modules/string/tests/nonreg_tests/bug_12291.dia.ref [deleted file]
scilab/modules/string/tests/nonreg_tests/bug_12291.tst
scilab/modules/umfpack/demos/sparse_matrices.sce

index 8810dfc..0cef3b1 100644 (file)
@@ -77,7 +77,7 @@ function [] = demo_clean()
 
     for i=1:size(opened_windows,"c")
         if (opened_windows(i)>=100000) & (opened_windows(i)<=100100) then
-            xdel(opened_windows(i));
+            close(opened_windows(i));
         end
     end
 
index 8f9ab1c..bfb6221 100644 (file)
@@ -24,7 +24,7 @@ function []=demo_folder_choice(path,ch)
                 return
             else
                 set("figure_style","old");
-                xdel();
+                close();
                 clf();
                 demoexc(num);
             end
@@ -53,7 +53,7 @@ function []=demo_folder_choice(path,ch)
                     lines(oldln(1))
                     return
                 else
-                    xdel(0);
+                    close(0);
                     clf();
                     demoex(num);
                 end
index ec5414c..2b49ccd 100644 (file)
@@ -15,11 +15,11 @@ function []=demo_function_choice()
     while %t then
         num=x_choose(demolist(:,1),"Choose a demo");
         if num==0 then
-            xdel(0);
+            close(0);
             lines(oldln(1));
             return;
         else
-            xdel(0);
+            close(0);
             clf();
             execstr(demolist(num,2));
         end,
index a52f6f4..d762c6f 100644 (file)
@@ -795,7 +795,7 @@ function status = test_single(_module, _testPath, _testName)
     tail = [ tail; "diary(0);" ];
 
     if graphic then
-        tail = [ tail; "xdel(winsid());sleep(1000);" ];
+        tail = [ tail; "close(winsid());sleep(1000);" ];
     end
 
     tail = [ tail; "exit(0);" ; "// <-- FOOTER END -->" ];
index f628959..f9bebb5 100644 (file)
@@ -46,7 +46,7 @@ function reinit_for_test()
 
     //reinitialize some Scilab state to be able to reproduce the same tests
     sdf();sda()
-    xdel(winsid())
+    close(winsid())
     grand("setgen","clcg4");grand("setall",11111111,22222222,33333333,44444444);
     grand("setgen","kiss");grand("setsd",362436069,521288629,123456789,380116160);
     grand("setgen","clcg2");grand("setsd",1234567890,123456789);
@@ -84,7 +84,7 @@ function r=xdel_run(w,opt)
             load(%U,"%wins_ref");
             if %CMP(%wins_, %wins_ref) then r=%t,return,end
         end
-        xdel(w)
+        close(w)
     else
         if get("figure_style")=="old" then return,end
         ids_ = cur
@@ -93,7 +93,7 @@ function r=xdel_run(w,opt)
         %wins_=ghdl2tree(gcf());
         load(%U,"%wins_ref");
         if %CMP(%wins_,%wins_ref) then r=%t,return,end
-        xdel()
+        close()
     end
     if or(winsid()==cur) then scf(cur),end
 
index 5413eb0..b6cec24 100644 (file)
@@ -16,7 +16,7 @@ assert_checkequal(d.user_data, "test");
 a1=gca();
 assert_checkequal(a1.user_data, "test");
 
-xdel(winsid());
+close(winsid());
 assert_checkequal(d.user_data, "test");
 
 a1 = gca();
@@ -28,4 +28,4 @@ assert_checkequal(a1.user_data, "test");
 scf();
 a2 = gca();
 assert_checkequal(a2.user_data, "test 2");
-xdel(winsid());
+close(winsid());
index ae461af..e97a1a4 100644 (file)
@@ -670,7 +670,7 @@ isoview off
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index 958c09f..9ec4b7e 100644 (file)
@@ -535,6 +535,9 @@ isoview off
             </member>
             <member>
                 <link linkend="gca">gca</link>
+            <member>
+            </member>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="axes_properties">axes_properties</link>
index cec328f..17f4eb3 100644 (file)
@@ -928,7 +928,7 @@ h.z_ticks = tlist(['ticks','locations','labels'],[-1,0,1],['Point 1','Point 2','
                 <link linkend="gcf">gcf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index 84383ef..7a4a619 100644 (file)
@@ -489,7 +489,7 @@ Z= [   0.0001    0.0013    0.0053   -0.0299   -0.1809   -0.2465   -0.1100   -0.0
     0.0002    0.0104    0.1733    1.0852    2.6741    2.6725    1.1119    0.1973    0.0152    0.0005
     0.0000    0.0012    0.0183    0.1099    0.2684    0.2683    0.1107    0.0190    0.0014    0.0000];
 
-xdel(winsid()) // destroy all existing figures
+close(winsid()) // destroy all existing figures
 surf(Z,Z+5) // colors array specified
 e=gce();
 e.cdata_mapping='direct' // default is 'scaled' relative to the colormap
@@ -508,7 +508,7 @@ e.color_flag=3; // interpolated shading mode. The default is 4 ('flat' mode) for
             0.0002    0.0104    0.1733    1.0852    2.6741    2.6725    1.1119    0.1973    0.0152    0.0005
             0.0000    0.0012    0.0183    0.1099    0.2684    0.2683    0.1107    0.0190    0.0014    0.0000];
 
-            xdel(winsid()) // destroy all existing figures
+            close(winsid()) // destroy all existing figures
             surf(Z,Z+5) // colors array specified
             e=gce();
             e.cdata_mapping='direct' // default is 'scaled' relative to the colormap
@@ -686,7 +686,7 @@ surf(axfig10,Z,'ydat',[100:109],'marker','d','markerfac','green','markeredg','ye
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index aee5285..64f55cd 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xdel">xdel</link>
+                    <link linkend="close">close</link>
                 </term>
                 <listitem>
-                    <para>Delete a graphics window</para>
+                    <para>Close some graphic windows</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
index e2ae68f..a480cf2 100644 (file)
@@ -53,7 +53,7 @@ a.box="off";
 a.x_location="middle";
 a.parent.background=4;
 delete(gca()) // delete the current axes
-xdel(0) //delete a graphics window
+close(0) //delete a graphics window
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
index 0b5deab..d9dfbfe 100644 (file)
             replot([-1,-1,10,2])
         </scilab:image>
         <programlisting role="example"><![CDATA[
-      xdel(winsid());
+      close(winsid());
       plot() // plot demo
       f = gcf();
       replot([-1,-1,10,2],f.children(1)) // specify axes handle's value
       replot([-3,-2,8,4],f.children(2))
       ]]></programlisting>
         <scilab:image>
-            xdel(winsid());
+            close(winsid());
             plot()
             f2=gcf();
             replot([-1,-1,10,2],f2.children(1))
index 2e878e0..2faf51a 100644 (file)
@@ -65,7 +65,7 @@ subplot(223);
 plot2d(x-2,sin(x))
 subplot(224);
 plot2d(x-6,[2*cos(x)+.7 2*cos(x)+.9 cos(2*x) .2+sin(3*x)],[-1,-2,-3 -4])
-xdel(0)
+close(0)
 plot2d(x-2,sin(x))
  ]]></programlisting>
     </refsection>
index dd668b8..6e50d64 100644 (file)
@@ -187,7 +187,7 @@ end
 // Removing all figures
 b = messagebox(_("Press OK to close all figures"),_("End of demo"), "question", "modal");
 w = winsid();
-xdel(w($-15:$));
+close(w($-15:$));
     ]]></programlisting>
         <para>
             <inlinemediaobject>
index b8e1100..370cd59 100644 (file)
                 <link linkend="close">close</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="who">who</link>
+            </member>
+            <member>
+                <link linkend="file">file()</link>
+            </member>
+            <member>
+                <link linkend="dispfiles">dispfiles</link>
             </member>
         </simplelist>
     </refsection>
index 66b25d4..775e43f 100644 (file)
 <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="xdel">
     <refnamediv>
         <refname>xdel</refname>
-        <refpurpose>delete a graphics window</refpurpose>
+        <refpurpose>delete a graphics window <emphasis role="bold">(obsolete)</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>xdel([win_nums])</synopsis>
+        <synopsis>
+            xdel()
+            xdel(win_nums)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
@@ -35,6 +38,9 @@
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            xdel(…) is obsolete and will be removed from Scilab 6.2. Please use close(…) instead.
+        </warning>
         <para>
             <function>xdel</function> deletes the graphics windows whose numbers
             are included in the vector <varname>win_nums</varname> or the current
@@ -65,4 +71,15 @@ xdel(); // delete the current figure
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    xdel() declared obsolete. close() replaces it.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index e1b9d16..fc734bd 100644 (file)
@@ -102,9 +102,6 @@ delete("all"); //delete all the graphics objects of the figure
                 <link linkend="graphics_entities">graphics_entities</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
-            </member>
-            <member>
                 <link linkend="close">close</link>
             </member>
         </simplelist>
index e7a9227..3f28dae 100644 (file)
@@ -157,7 +157,7 @@ gca().axes_bounds = [0.5 0 0.5 1];  // puts the grayplot as subplot(1,2,2)
 gcf().axes_size = [700 350];
 save(graypolar, "f");   // records the actual colormap, as a figure's property
 
-xdel(winsid())
+close(winsid())
 xload(graypolar, 7) // The first restored element is a figure in a clean window
                     // => It imposes its colormap & axes_size.. to the figure
 xload(plotAxes)
index 086478a..3b9aa45 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xdel">xdel</link>
+                    <link linkend="close">close</link>
                 </term>
                 <listitem>
-                    <para>supprime une fenêtre graphique</para>
+                    <para>Ferme une ou plusieurs fenêtres graphiques</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
index a4f6f78..7f5c221 100644 (file)
         </scilab:image>
         <programlisting role="example"><![CDATA[
 // second exemple
-xdel(winsid());
+close(winsid());
 plot() // plot demo
 f=gcf();
 replot([-1,-1,10,2],f.children(1)) // specify axes handle's value
 replot([-3,-2,8,4],f.children(2))
  ]]></programlisting>
         <scilab:image>
-            xdel(winsid());
+            close(winsid());
             plot()
             f2=gcf();
             replot([-1,-1,10,2],f2.children(1))
index b9a1c5d..1a54424 100644 (file)
@@ -187,7 +187,7 @@ end
 // Ménage : on supprime les 16 fenêtres
 b = messagebox(_("Presser OK pour fermer les fenêtres"),"Clore la démonstration", "question", "modal");
 w = winsid();
-xdel(w($-15:$));
+close(w($-15:$));
     ]]></programlisting>
         <para>
             <inlinemediaobject>
index ef2f1a2..ae6b467 100644 (file)
                 <link linkend="close">close</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="who">who</link>
+            </member>
+            <member>
+                <link linkend="file">file()</link>
+            </member>
+            <member>
+                <link linkend="dispfiles">dispfiles</link>
             </member>
         </simplelist>
     </refsection>
index 61416a1..4148c70 100644 (file)
@@ -2,11 +2,15 @@
 <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="xdel">
     <refnamediv>
         <refname>xdel</refname>
-        <refpurpose>supprime des fenêtres graphiques  </refpurpose>
+        <refpurpose>supprime des fenêtres graphiques <emphasis role="bold">(obsolète)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
-        <synopsis>xdel([win-nums])</synopsis>
+        <synopsis>
+            xdel()
+            xdel(win_nums)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Paramètres</title>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            xdel(…) est obsolète et sera retirée de Scilab 6.2. SVP désormais utiliser close(…).
+        </warning>
         <para>
             <literal>xdel</literal> supprime les fenêtres graphiques dont les numéros sont donnés dans le vecteur <literal>win-nums</literal> ou supprime la
             fenêtre graphique courante si aucun argument n'est donné.
         </para>
     </refsection>
+    <refsection>
+        <title>Exemples</title>
+        <programlisting role="example"><![CDATA[
+plot2d();
+scf();
+plot3d();
+xdel(0); // ferme la 1ère fenêtre
+xdel();  // ferme la fenêtre restante
+ ]]></programlisting>
+    </refsection>
+    <refsection role="see also">
+        <title>Voir aussi</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="close">close</link>
+            </member>
+            <member>
+                <link linkend="delete">delete</link>
+            </member>
+            <member>
+                <link linkend="winsid">winsid</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection role="history">
+        <title>Historique</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    xdel() déclarée obsolète. close() peut être utilisée.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 42b8482..dbedc17 100644 (file)
@@ -696,7 +696,7 @@ isoview off
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index c71fd7f..d73c963 100644 (file)
@@ -558,6 +558,9 @@ isoview off
             </member>
             <member>
                 <link linkend="gca">gca</link>
+            <member>
+            </member>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="axes_properties">axes_properties</link>
index d4e0b27..b111969 100644 (file)
@@ -1,14 +1,8 @@
 <?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,
  * 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: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="plot3d" xml:lang="ja">
-
     <refnamediv>
-
         <refname>plot3d</refname>
-
         <refpurpose>曲面の3次元プロット</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
         <synopsis>plot3d(x,y,z,[theta,alpha,leg,flag,ebox])
-
             plot3d(x,y,z,&lt;opt_args&gt;)
-
-
-
             plot3d(xf,yf,zf,[theta,alpha,leg,flag,ebox])
-
             plot3d(xf,yf,zf,&lt;opt_args&gt;)
-
-
-
             plot3d(xf,yf,list(zf,colors),[theta,alpha,leg,flag,ebox])
-
             plot3d(xf,yf,list(zf,colors),&lt;opt_args&gt;)
-
-
-
             plot3d(z)
-
         </synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>x,y</term>
-
                 <listitem>
-
                     <para>大きさ n1 および n2の行ベクトル (x軸およびy軸座標).
-
                         これらの座標は単調である必要があります.
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>z</term>
-
                 <listitem>
-
                     <para>
-
                         大きさ (n1,n2)の行列. <literal>z(i,j)</literal> は点(x(i),y(j))における
-
                         曲面の値です.
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>xf,yf,zf</term>
-
                 <listitem>
-
                     <para>大きさ (nf,n)の行列. 曲面を描画する際に使用される小平面を定義します.
-
                         <literal>n</literal>個の小平面があります. 各小平面
-
                         <literal>i</literal> は<literal>nf</literal>個の点を有するポリゴンで定義されます.
-
                         i番目の小平面の点のx軸,y軸,z軸座標はそれぞれ<literal>xf(:,i)</literal>,
-
                         <literal>yf(:,i)</literal> および  <literal>zf(:,i)</literal>により指定されます.
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>colors</term>
-
                 <listitem>
-
                     <para>大きさnのベクトルで,各小平面の色を指定します,もしくは,
-
                         大きさ(nf,n)の行列で各小平面の境界近傍の色を指定します
-
                         (小平面の色は補間されます).
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>&lt;opt_args&gt;</term>
-
                 <listitem>
-
                     <para>
-
                         一連の命令<literal>key1=value1,
-
                             key2=value2
-
                         </literal>
-
                         ,...を表し, <literal>key1</literal>,
-
                         <literal>key2,...</literal> は以下のどれかとすることができます: theta,
-
                         alpha ,leg,flag,ebox (以下の定義を参照).
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>theta, alpha</term>
-
                 <listitem>
-
                     <para>観測点の球座標を指定する実数値(単位:度).</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>leg</term>
-
                 <listitem>
-
                     <para>各軸のラベルを定義する文字列. @ をフィールドセパレータとし,
-
                         "X@Y@Z"のようになります.
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>flag</term>
-
                 <listitem>
-
                     <para>大きさ3の実数ベクトル.
-
                         <literal>flag=[mode,type,box]</literal>.
-
                     </para>
-
                     <variablelist>
-
                         <varlistentry>
-
                             <term>mode</term>
-
                             <listitem>
-
                                 <para>整数 (曲面の色).</para>
-
                                 <variablelist>
-
                                     <varlistentry>
-
                                         <term>mode&gt;0</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 曲面は色<literal>"mode"</literal>で塗られます ;
-
                                                 小平面の境界はカレントの線種と色で描画されます.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>mode=0:</term>
-
                                         <listitem>
-
                                             <para>曲面のメッシュが描画されます.</para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>mode&lt;0:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 曲面は色<literal>"-mode"</literal>で塗られます ;
-
                                                 小平面の境界は描画されません.
-
                                             </para>
-
                                             <para>曲面の色の取り扱いは,
-
                                                 surfaceエンティティプロパティによる
-
                                                 <literal>color_mode</literal>および
-
                                                 <literal>color_flag</literal>オプションを用いて
-
                                                 行われることに注意してください (<link linkend="surface_properties">surface_properties</link>参照).
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                 </variablelist>
-
                             </listitem>
-
                         </varlistentry>
-
                         <varlistentry>
-
                             <term>type</term>
-
                             <listitem>
-
                                 <para>整数 (スケール).</para>
-
                                 <variablelist>
-
                                     <varlistentry>
-
                                         <term>type=0:</term>
-
                                         <listitem>
-
                                             <para>プロットは
-
                                                 (前の<literal>param3d</literal>,
-
                                                 <literal>plot3d</literal>, <literal>contour</literal> または
-
                                                 <literal>plot3d1</literal>のコールで設定された)
-
                                                 カレントの3次元スケールで行われます.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=1:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 3次元ボックスのスケールがアスペクト比の最大値に基づき
-
                                                 自動的に調整され,
-
                                                 境界はオプションの引数<literal>ebox</literal>の値で
-
                                                 指定されます.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=2:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 3次元ボックスのスケールがアスペクト比の最大値に基づき
-
                                                 自動的に調整され,
-
                                                 境界は指令したデータにより計算されます.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=3:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 オプション<literal>ebox</literal>で指定したボックス境界を有する
-
                                                 3次元等軸プロットで,<literal>type=1</literal>に似ています.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=4:</term>
-
                                         <listitem>
-
                                             <para>データで定義された境界に基づく3次元等軸プロットで,
-
                                                 <literal>type=2</literal>に似ています.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=5:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 オプション<literal>ebox</literal>で指定されたボックス境界で
-
                                                 定義された境界に基づく3次元拡張等軸プロットで,
-
                                                 <literal>type=1</literal>に似ています.
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>type=6:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 データで定義された境界に基づく3次元拡張等軸プロットで,
-
                                                 <literal>type=2</literal>に似ています.
-
                                                 軸の境界は axes エンティティプロパティによりカスタマイズできる
-
                                                 ことに注意してください(<link linkend="axes_properties">axes_properties</link>参照).
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                 </variablelist>
-
                             </listitem>
-
                         </varlistentry>
-
                         <varlistentry>
-
                             <term>box</term>
-
                             <listitem>
-
                                 <para>整数 (プロットの周囲のフレーム).</para>
-
                                 <variablelist>
-
                                     <varlistentry>
-
                                         <term>box=0:</term>
-
                                         <listitem>
-
                                             <para>プロットの周囲に何も描画されません.</para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>box=1:</term>
-
                                         <listitem>
-
                                             <para>実装されていません (box=0と同様).</para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>box=2:</term>
-
                                         <listitem>
-
                                             <para>曲面の背後の軸のみが描画されます.</para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>box=3:</term>
-
                                         <listitem>
-
                                             <para>曲面を囲うボックスが描画され,キャプションが追加されます.</para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                     <varlistentry>
-
                                         <term>box=4:</term>
-
                                         <listitem>
-
                                             <para>
-
                                                 曲面を囲うボックスが描画され,キャプションと軸が追加されます.
-
                                             </para>
-
                                             <para>
-
                                                 軸のアスペクトもaxesエンティティのプロパティによりカスタマイズ
-
                                                 できることに注意してください (<link linkend="axes_properties">axes_properties</link>参照).
-
                                             </para>
-
                                         </listitem>
-
                                     </varlistentry>
-
                                 </variablelist>
-
                             </listitem>
-
                         </varlistentry>
-
                     </variablelist>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>ebox</term>
-
                 <listitem>
-
                     <para>
-
                         プロットの境界をベクトル
-
                         <literal>[xmin,xmax,ymin,ymax,zmin,zmax]</literal>で指定します.
-
                         この引数は,<literal>flag</literal>の<literal>type</literal>が<literal>1</literal>,
-
                         <literal>3</literal> または <literal>5</literal>に設定された場合,
-
                         使用されます (対応する動作については上記参照).
-
                         <literal>flag</literal> が指定されない場合
-
                         <literal>ebox</literal> は無視されます.
-
                     </para>
-
                     <para>
-
                         指定された場合, <literal>ebox</literal>引数は,
-
                         <literal>data_bounds</literal>に基づいて動作し,
-
                         axesエンティティのプロパティによりリセットすることも可能であることに
-
                         注意してください. ebox のデフォルト値は[0,1,0,1,0,1]です.(<link linkend="axes_properties">axes_properties</link>参照)
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             <literal>plot3d(x,y,z,[theta,alpha,leg,flag,ebox])</literal> は
-
             パラメータ表現の曲面 <literal>z=f(x,y)</literal>を描画します.
-
         </para>
-
         <para>
-
             <literal>plot3d(xf,yf,zf,[theta,alpha,leg ,flag,ebox])</literal>
-
             は小平面の集合で定義された曲面を描画します.
-
             <literal>xf</literal>, <literal>yf</literal> および
-
             <literal>zf</literal>を
-
             <literal>[xf1 xf2 ...]</literal>, <literal>[yf1 yf2 ...]</literal> および
-
             <literal>[zf1 zf2 ...]</literal>のように行単位で集約した
-
             複数の行列で置き換えることにより
-
             複数のプロットを描画することができます.
-
             データはsurfaceエンティティパラメータにより設定または取得できること
-
             に注意してください (<link linkend="surface_properties">surface_properties</link>参照).
-
         </para>
-
         <para/>
-
         <para>
-
             小平面の色を<literal>zf</literal>ではなく<literal>list(zf,colors)</literal>
-
             により指定することができます.
-
             ただし,<literal>colors</literal> は大きさ<literal>n</literal>の
-
             ベクトルです.
-
             <literal>colors(i)</literal> が正の場合,この値が小平面<literal>i</literal>の
-
             色を指定し,小平面の境界はカレントの線種と色で描画されます.
-
             <literal>colors(i)</literal> が負の場合, 色ID
-
             <literal>-colors(i)</literal>が使用され,小平面の境界は描画されません.
-
         </para>
-
         <para/>
-
         <para>小平面に補間された色を適用することも可能です.
-
             この場合, color 引数は nf x n の行列とする必要があり,その要素は
-
             各小平面の極回近傍の色を指定します.
-
             この場合, 正の値の色は境界が描画されないことを意味します.
-
             色は( <literal>tlist</literal> affectationsにより)
-
             surface エンティティプロパティでも設定可能であり,
-
             <literal>color_flag</literal>オプションにより編集可能です
-
             ( <link linkend="surface_properties">surface_properties</link>参照).
-
         </para>
-
         <para/>
-
         <para>
-
             オプションの引数 <literal>theta, alpha, leg ,flag,
-
                 ebox
-
             </literal>
-
             ,を一連の命令
-
             <literal>key1=value1, key2=value2</literal>, ...により指定することができます.
-
             この場合,順番は任意です.
-
             これらの<literal>flag</literal>以外のオプションの引数は
-
             axesエンティティプロパティによりカスタマイズできます
-
             (see <link linkend="axes_properties">axes_properties</link>参照).
-
             前述の通り, <literal>flag</literal> オプションは
-
             <literal>mode</literal>についてはsurfaceエンティティプロパティ( <link linkend="surface_properties">surface_properties</link>参照) ,
-
             <literal>type</literal> および<literal>box</literal>については
-
             axes プロパティ (<link linkend="axes_properties">axes_properties</link>参照)
-
             で扱うことができます.
-
         </para>
-
         <para/>
-
         <para>
-
             曲面<literal>z=f(x,y)</literal>から4角形の小平面を計算する際に
-
             関数<literal>genfac3d</literal>を使用することができます.
-
             <literal>eval3dp</literal> も使用できます.
-
         </para>
-
         <para/>
-
         <para>
-
             コマンド <literal>plot3d()</literal> を入力するとデモを参照できます.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <scilab:image>
-
             t=[0:0.3:2*%pi]';
-
             z=sin(t)*cos(t');
-
             plot3d(t,t,z)
-
         </scilab:image>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-
 //  z=f(x,y) による簡単な例
-
 t=[0:0.3:2*%pi]';
-
 z=sin(t)*cos(t');
-
 plot3d(t,t,z)
-
 // genfac3dにより計算された小平面を用いて同じ図をプロット
-
 [xx,yy,zz]=genfac3d(t,t,z);
-
 clf()
-
 plot3d(xx,yy,zz)
-
 // 複数のプロット
-
 clf()
-
 plot3d([xx xx],[yy yy],[zz 4+zz])
-
 // カラーで複数のプロット
-
 clf()
-
 plot3d([xx xx],[yy yy],list([zz zz+4],[4*ones(1,400) 5*ones(1,400)]))
-
 // 視点とキャプションを指定してプロット
-
 clf()
-
 plot3d(1:10,1:20,10*rand(10,20),alpha=35,theta=45,flag=[2,2,3])
-
 // eval3dp で計算された小平面により球をプロット
-
 deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";..
-
      "y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)";..
-
      "z=r*sin(alp)+orig(3)*ones(tet)"]);
-
 r=1; orig=[0 0 0];
-
 [xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
-
 clf();plot3d(xx,yy,zz)
-
 clf();
-
 f=gcf();
-
 f.color_map = hotcolormap(128);
-
 r=0.3;orig=[1.5 0 0];
-
 [xx1,yy1,zz1]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
-
 cc=(xx+zz+2)*32;cc1=(xx1-orig(1)+zz1/r+2)*32;
-
 clf();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),theta=70,alpha=80,flag=[5,6,3])
 
-
-
-delete(gcf());
-
+close()
 t=[0:0.3:2*%pi]'; z=sin(t)*cos(t');
-
 [xx,yy,zz]=genfac3d(t,t,z);
-
 plot3d([xx xx],[yy yy],list([zz zz+4],[4*ones(1,400) 5*ones(1,400)]))
-
 e=gce();
-
 f=e.data;
-
 TL = tlist(["3d" "x" "y" "z" "color"],f.x,f.y,f.z,6*rand(f.z)); // ランダムな色の行列
-
 e.data = TL;
-
 TL2 = tlist(["3d" "x" "y" "z" "color"],f.x,f.y,f.z,4*rand(1,800)); // ランダムな色のベクトル
-
 e.data = TL2;
-
 TL3 = tlist(["3d" "x" "y" "z" "color"],f.x,f.y,f.z,[20*ones(1,400) 6*ones(1,400)]);
-
 e.data = TL3;
-
 TL4 = tlist(["3d" "x" "y" "z"],f.x,f.y,f.z); // no color
-
 e.data = TL4;
-
 e.color_flag=1 // 高度 (z座標)に比例する色インデックス
-
 e.color_flag=2; // デフォルトモードに戻る
-
 e.color_flag= 3; // 補間陰影モード (デフォルト色の青に基づく)
-
 clf()
-
 plot3d([xx xx],[yy yy],list([zz zz+4],[4*ones(1,400) 5*ones(1,400)]))
-
 h=gce(); //カレントのエンティティ(ここでは曲面)のハンドルを取得
-
 a=gca(); //カレントの軸を取得
-
 a.rotation_angles=[40,70];
-
 a.grid=[1 1 1]; //グリッドを作成
-
 a.data_bounds=[-6,0,-1;6,6,5];
-
 a.axes_visible="off"; //軸を隠す
-
 a.axes_bounds=[.2 0 1 1];
-
 h.color_flag=1; //色は zに比例
-
 h.color_mode=-2;  //color_modeを白色に設定することにより小平面の境界を削除
-
 h.color_flag=2; //指定した色に基づく色
-
 h.color_mode = -1; //color_modeを黒色に設定することにより小平面の境界を戻す
-
 f=gcf();//親のfigureのハンドルを取得
-
 f.color_map=hotcolormap(512);
-
 c=[1:400,1:400];
-
 TL.color = [c;c+1;c+2;c+3];
-
 h.data = TL;
-
 h.color_flag=3; // 補間陰影モード
-
  ]]></programlisting>
-
         <para>一連のパッチ(3角形,4角形,など)をプロットする際にplot3d関数を使用することができます.</para>
-
         <programlisting role="example"><![CDATA[
-
 // パッチを描画するe plot3d 関数:
-
 // patch(x,y,[z])
-
 // patch(x,y,[list(z,c)])
-
 // x の大きさ: パッチの点の数 x パッチの数
-
 // y および z は x と同じ大きさ
-
 // c:
-
 // - パッチの数を大きさとするベクトル: パッチの色
-
 // - 大きさがパッチの点の数 x パッチの数の行列
-
 //   : 各パッチの各点の色
 
-
-
 // 例 1: 3角形パッチの集合
-
-
-
 x = [0 0;
-
      0 1;
-
      1 1];
-
-
-
 y = [1 1;
-
      2 2;
-
      2 1];
-
-
-
 z = [1 1;
-
      1 1;
-
      1 1];
-
-
-
+        
 tcolor = [2 3]';
 
-
-
 subplot(2,2,1);
 
 plot3d(x,y,list(z,tcolor));
-
 xtitle('A triangle set of patches');
 
-
-
 // 例2: 3角形および4角形パッチが混在
 
-
-
 xquad = [5, 0;
-
          10,0;
-
          15,5;
-
          10,5];
-
-
-
 yquad = [15,0;
-
          20,10;
-
          15,15;
-
          10,5];
-
-
-
 zquad = ones(4,2);
-
-
-
 xtri = [ 0,10,10, 5, 0;
-
         10,20,20, 5, 0;
-
         20,20,15,10,10];
-
-
-
 ytri = [ 0,10,20, 5,10;
-
         10,20,20,15,20;
-
          0, 0,15,10,20];
-
-
-
 ztri = zeros(3,5);
 
-
-
 subplot(2,2,3);
-
 plot3d(xquad,yquad,zquad);
-
 plot3d(xtri,ytri,ztri);
-
 xtitle('Mixing triangle and quadrangle set of patches');
 
-
-
 // 例3: いくつかのうさぎ
 
-
-
 rabxtri = [ 5,  5, 2.5,  7.5, 10;
-
             5, 15, 5,   10,   10;
-
            15, 15, 5,   10,   15];
-
-
-
 rabytri = [10, 10, 9.5,  2.5, 0;
-
            20, 10, 12,   5,   5;
-
            10   0   7    0    0];
-
 rabztri = [0,0,0,0,0;
-
            0,0,0,0,0;
-
            0,0,0,0,0];
-
-
-
 rabtricolor_byface = [2 2 2 2 2];
-
-
-
 rabtricolor = [2,2,2,2,2;
-
                3,3,3,3,3;
-
                4,4,4,4,4];
-
-
-
 rabxquad = [0, 1;
-
             0, 6;
-
             5,11;
-
             5, 6];
-
-
-
 rabyquad = [18,23;
-
             23,28;
-
             23,28;
-
             18,23];
-
-
-
 rabzquad = [1,1;
-
             1,1;
-
             1,1;
-
             1,1];
-
-
-
 rabquadcolor_byface = [2 2];
-
-
-
 rabquadcolor = [2,2;
-
                 3,3;
-
                 4,4;
-
                 5,5];
-
-
-
+                               
 subplot(2,2,2);
-
 plot3d(rabxtri, rabytri, list(rabztri,rabtricolor));
-
 plot3d(rabxquad,rabyquad,list(rabzquad,rabquadcolor));
-
 h = gcf();
-
 h.children(1).background = 1;
-
 xtitle('A psychedelic rabbit set of patches');
 
-
-
 subplot(2,2,4);
-
 plot3d(rabxtri, rabytri, list(rabztri,rabtricolor_byface));
-
 plot3d(rabxquad,rabyquad,list(rabzquad,rabquadcolor_byface));
-
 h = gcf();
-
 h.children(1).background = 1;
-
 xtitle('A standard rabbit set of patches');
-
  ]]></programlisting>
-
         <para>頂点と面により一連のパッチをプロットするために
-
             plot3d関数を使用することもできます.
-
         </para>
-
         <programlisting role="example"><![CDATA[
-
 // 頂点 / 面の例: 3次元の例
 
-
-
 // 各パッチを構成するユニークな点の一覧を有する頂点のリスト
-
 // 2つのパッチに共通な点は頂点のリストで反復されません
 
-
-
 vertex = [0 1 1;
-
           0 2 2;
-
           1 2 3;
-
           1 1 4];
-
-
-
 // 頂点のリストはどの点がパッチを構成するかを示します.
-
 face = [1 2 3;
-
         1 3 4];
-
-
-
 tcolor = [2 3]';
 
-
-
 // x, y, z のリストで表された頂点/面を変換する際に使用される式
-
-
-
 xvf = matrix(vertex(face,1),size(face,1),length(vertex(face,1))/size(face,1))';
-
 yvf = matrix(vertex(face,2),size(face,1),length(vertex(face,1))/size(face,1))';
-
 zvf = matrix(vertex(face,3),size(face,1),length(vertex(face,1))/size(face,1))';
 
-
-
 scf();
-
 subplot(2,1,1);
-
 plot3d(xvf,yvf,list(zvf,tcolor));
-
 xtitle('A triangle set of patches - vertex / face mode - 3d');
 
-
-
 // 2次元のテスト
-
 // 0 Z 値を有する3次元表現を使用した後, 2次元表現に切り替えます
-
-
-
 // 頂点/面の例: 3次元の例
-
-
-
 // 頂点のリストには各パッチを構成するユニークな点の一覧を有します
-
 // 2つのパッチに共通する点は頂点のリスト内で繰り返されません
-
-
-
 vertex = [0 1;
-
           0 2;
-
           1 2;
-
           1 1];
 
-
-
 // 頂点のリストはどの点がパッチを構成するかを示します.
-
 face = [1 2 3;
-
         1 3 4];
 
-
-
 // x, y, z のリストで表された頂点/面を変換する際に使用される式
-
-
-
 xvf = matrix(vertex(face,1),size(face,1),length(vertex(face,1))/size(face,1))';
-
 yvf = matrix(vertex(face,2),size(face,1),length(vertex(face,1))/size(face,1))';
-
 zvf = matrix(zeros(vertex(face,2)),size(face,1),length(vertex(face,1))/size(face,1))';
 
-
-
 subplot(2,1,2);
-
 plot3d(xvf,yvf,list(zvf,tcolor));
-
 xtitle('A triangle set of patches - vertex / face mode - 2D');
-
 a = gca();
-
 a.view = '2d';
-
  ]]></programlisting>
-
         <para>マニュアルで目盛を設定する方法</para>
-
         <programlisting role="example"><![CDATA[
-
 plot3d();
-
 h = gca();
-
 h.x_ticks = tlist(['ticks','locations','labels'],[-2,-1,0,1,2],['-2','-1','0','1','2']);
-
 h.y_ticks = tlist(['ticks','locations','labels'],[-4,-3-2,-1,0,1,2,3,4],['-4','-3','-2','-1','0','1','2','3','4']);
-
 h.z_ticks = tlist(['ticks','locations','labels'],[-1,0,1],['Point 1','Point 2','Point 3']);
-
  ]]></programlisting>
-
         <para/>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="eval3dp">eval3dp</link>
-
             </member>
-
             <member>
-
                 <link linkend="genfac3d">genfac3d</link>
-
             </member>
-
             <member>
-
                 <link linkend="geom3d">geom3d</link>
-
             </member>
-
             <member>
-
                 <link linkend="param3d">param3d</link>
-
             </member>
-
             <member>
-
                 <link linkend="plot3d1">plot3d1</link>
-
             </member>
-
             <member>
-
                 <link linkend="clf">clf</link>
-
             </member>
-
             <member>
-
                 <link linkend="gca">gca</link>
-
             </member>
-
             <member>
-
                 <link linkend="gcf">gcf</link>
-
             </member>
-
             <member>
-
-                <link linkend="xdel">xdel</link>
-
+                <link linkend="close">close</link>
             </member>
-
             <member>
-
                 <link linkend="delete">delete</link>
-
             </member>
-
             <member>
-
                 <link linkend="axes_properties">axes_properties</link>
-
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 60d8aef..2020a0c 100644 (file)
@@ -498,7 +498,7 @@ Z= [   0.0001    0.0013    0.0053   -0.0299   -0.1809   -0.2465   -0.1100   -0.0
     0.0002    0.0104    0.1733    1.0852    2.6741    2.6725    1.1119    0.1973    0.0152    0.0005
     0.0000    0.0012    0.0183    0.1099    0.2684    0.2683    0.1107    0.0190    0.0014    0.0000];
 
-xdel(winsid()) // 既存の図を全て削除
+close(winsid()) // 既存の図を全て削除
 surf(Z,Z+5) // colors 配列を指定
 e=gce();
 e.cdata_mapping='direct' // デフォルトはカラーマップに関して 'scaled' r
@@ -516,7 +516,7 @@ e.color_flag=3; // 補間影モード. surf のデフォルトは 4 ('flat' モ
             -0.0014   -0.0017    0.3189    2.7414    7.1622    7.1361    3.1242    0.6633    0.0674    0.0030
             0.0002    0.0104    0.1733    1.0852    2.6741    2.6725    1.1119    0.1973    0.0152    0.0005
             0.0000    0.0012    0.0183    0.1099    0.2684    0.2683    0.1107    0.0190    0.0014    0.0000];
-            xdel(winsid()) // destroy all existing figures
+            close(winsid()) // destroy all existing figures
             surf(Z,Z+5) // colors array specified
             e=gce();
             e.cdata_mapping='direct' // default is 'scaled' relative to the colormap
@@ -690,7 +690,7 @@ surf(axfig10,Z,'ydat',[100:109],'marker','d','markerfac','green','markeredg','ye
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index 4416694..0a05f55 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xdel">xdel</link>
+                    <link linkend="close">close</link>
                 </term>
                 <listitem>
                     <para>グラフィックウインドウを削除</para>
index 2012b22..96f55cc 100644 (file)
@@ -1,14 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
-
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
  * Copyright (C) INRIA - Djalel Abdemouche
-
  *
-
-
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * 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="gca">
-
     <refnamediv>
-
         <refname>gca</refname>
-
         <refpurpose>カレントの軸のハンドルを返す. </refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
         <synopsis>a = gca()</synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>a</term>
-
                 <listitem>
-
                     <para>カレント軸エンティティのハンドル (ハンドル型).</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             このルーチンは,カレントの図のカレント軸のハンドルを返します.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-
 subplot(211)
-
 a=gca() //カレントの軸を取得
-
 a.box="off";
-
 t=-%pi:0.3:%pi;plot3d(t,t,sin(t)'*cos(t),80,50,'X@Y@Z',[5,2,4]);
-
 subplot(212)
-
 plot2d(); //簡単なプロット
-
 a=gca() //カレントの軸を取得
-
 a.box="off";
-
 a.x_location="middle";
-
 a.parent.background=4;
-
 delete(gca()) // カレントの軸を削除
-
-xdel(0) //カレントのウインドウを削除
-
+close(0) //カレントのウインドウを削除
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="gda">gda</link>
-
             </member>
-
             <member>
-
                 <link linkend="gcf">gcf</link>
-
             </member>
-
             <member>
-
                 <link linkend="gce">gce</link>
-
             </member>
-
             <member>
-
                 <link linkend="get">get</link>
-
             </member>
-
             <member>
-
                 <link linkend="graphics_entities">graphics_entities</link>
-
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 824c460..36696bb 100644 (file)
@@ -147,14 +147,14 @@ replot([-1,-1,10,2])
         </scilab:image>
         <programlisting role="example"><![CDATA[
 // 二番目の例
-xdel(winsid());
+close(winsid());
 plot() // plot demo
 f=gcf();
 replot([-1,-1,10,2],f.children(1)) // axesハンドルの値を指定
 replot([-3,-2,8,4],f.children(2))
  ]]></programlisting>
         <scilab:image>
-            xdel(winsid());
+            close(winsid());
             plot()
             f2=gcf();
             replot([-1,-1,10,2],f2.children(1))
index 122f9d0..497ebed 100644 (file)
@@ -68,7 +68,7 @@ subplot(223);
 plot2d(x-2,sin(x))
 subplot(224);
 plot2d(x-6,[2*cos(x)+.7 2*cos(x)+.9 cos(2*x) .2+sin(3*x)],[-1,-2,-3 -4])
-xdel(0)
+close(0)
 plot2d(x-2,sin(x))
  ]]></programlisting>
     </refsection>
index 527cb44..d01ac9f 100644 (file)
@@ -1,14 +1,8 @@
 <?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
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * 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="winsid">
-
     <refnamediv>
-
         <refname>winsid</refname>
-
         <refpurpose>グラフィックウインドウのリストを返す</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
         <synopsis>x = winsid()</synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>x</term>
-
                 <listitem>
-
                     <para>行ベクトル.</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             <function>winsid</function>はグラフィックウインドウのリストを
-
             ウインドウ番号のベクトルとして取得する際に使用されます.
-
         </para>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="close">close</link>
-
             </member>
-
             <member>
-
-                <link linkend="xdel">xdel</link>
-
+                <link linkend="who">who</link>
+            </member>
+            <member>
+                <link linkend="file">file()</link>
+            </member>
+            <member>
+                <link linkend="dispfiles">dispfiles</link>
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 03bfad5..b4723f0 100644 (file)
@@ -1,14 +1,8 @@
 <?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,
  * 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="xdel">
-
     <refnamediv>
-
         <refname>xdel</refname>
-
-        <refpurpose>グラフィックウインドウを削除する</refpurpose>
-
+        <refpurpose>グラフィックウインドウを削除する <emphasis role="bold">(obsolete)</emphasis></refpurpose>
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>xdel([win_nums])</synopsis>
-
+        <synopsis>
+            xdel()
+            xdel(win_nums)
+        </synopsis>
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>win_nums</term>
-
                 <listitem>
-
                     <para>整数のスカラーまたはベクトル</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
+        <warning>
+            xdel(…) is obsolete and will be removed from Scilab 6.2. Please use close(…) instead.
+        </warning>
         <para>
-
             <function>xdel</function>は,
-
             番号がベクトル<varname>win_nums</varname>に含まれる
-
             グラフィックウインドウを削除します.
-
             引数が指定されない場合には,
-
             カレントのグラフィックウインドウを削除します.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-
 plot2d();
-
 scf();
-
 plot3d();
-
 xdel(0); // 最初のグラフィックを削除
-
 xdel(); // カレントのグラフィックを削除
-
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="close">close</link>
-
             </member>
-
             <member>
-
                 <link linkend="delete">delete</link>
-
             </member>
-
             <member>
-
                 <link linkend="winsid">winsid</link>
-
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    xdel() declared obsolete. close() replaces it.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
\ No newline at end of file
index e5c0ba0..2f75138 100644 (file)
@@ -672,7 +672,7 @@ isoview off
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index ac0f762..10ab019 100644 (file)
@@ -395,7 +395,7 @@ cc=(xx+zz+2)*32;cc1=(xx1-orig(1)+zz1/r+2)*32;
 clf();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),theta=70,alpha=80,flag=[5,6,3])
 
 //operações disponíveis apenas no novo modo de gráficos
-delete(gcf());
+close()
 t=[0:0.3:2*%pi]'; z=sin(t)*cos(t');
 [xx,yy,zz]=genfac3d(t,t,z);
 plot3d([xx xx],[yy yy],list([zz zz+4],[4*ones(1,400) 5*ones(1,400)]))
@@ -648,7 +648,7 @@ h.z_ticks = tlist(['ticks','locations','labels'],[-1,0,1],['Point 1','Point 2','
                 <link linkend="gcf">gcf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index f02f3ca..1c08068 100644 (file)
@@ -465,7 +465,7 @@ surf(X,Y,Z)
 
 
 //exemplos com LineSpec e GlobalProperty:
-xdel(winsid()) // destruindo todas as figuras existentes
+close(winsid()) // destruindo todas as figuras existentes
 surf(Z,Z+5) // array de cores especificado
 e=gce();
 e.cdata_mapping='direct' // o padrão é 'scaled' relativo ao mapa de cores colormap
@@ -495,7 +495,7 @@ surf(axfig10,Z,'ydat',[100:109],'marker','d','markerfac','green','markeredg','ye
                 <link linkend="clf">clf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="close">close</link>
             </member>
             <member>
                 <link linkend="delete">delete</link>
index 08a5916..df1156c 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xdel">xdel</link>
+                    <link linkend="close">close</link>
                 </term>
                 <listitem>
-                    <para>Delete a graphics window</para>
+                    <para>Close some graphic windows</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
index f771513..0b1e8d3 100644 (file)
@@ -53,7 +53,7 @@ a.box="off";
 a.x_location="middle";
 a.parent.background=4;
 delete(gca()) // deletando os eixos correntes
-xdel(0) //deletando uma janela de gráficos
+close(0) //deletando uma janela de gráficos
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
index 4ef2e20..2b7191b 100644 (file)
@@ -141,14 +141,14 @@ replot([-1,-1,10,2])
 
         <programlisting role="example"><![CDATA[
 // segundo exemplo
-xdel(winsid());
+close(winsid());
 plot() // plot demo
 f=gcf();
 replot([-1,-1,10,2],f.children(1)) // especificando o valor do manipulador dos eixos
 replot([-3,-2,8,4],f.children(2))
  ]]></programlisting>
         <scilab:image>
-            xdel(winsid());
+            close(winsid());
             plot()
             f2=gcf();
             replot([-1,-1,10,2],f2.children(1))
index 45df2fe..c47b19c 100644 (file)
@@ -65,7 +65,7 @@ subplot(223);
 plot2d(x-2,sin(x))
 subplot(224);
 plot2d(x-6,[2*cos(x)+.7 2*cos(x)+.9 cos(2*x) .2+sin(3*x)],[-1,-2,-3 -4])
-xdel(0)
+close(0)
 plot2d(x-2,sin(x))
  ]]></programlisting>
     </refsection>
index e3a6c94..2c3cf38 100644 (file)
                 <link linkend="close">close</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="who">who</link>
+            </member>
+            <member>
+                <link linkend="file">file()</link>
+            </member>
+            <member>
+                <link linkend="dispfiles">dispfiles</link>
             </member>
         </simplelist>
     </refsection>
index cc26370..e18c273 100644 (file)
 <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="xdel" xml:lang="pt">
     <refnamediv>
         <refname>xdel</refname>
-        <refpurpose>deleta uma janela de gráficos</refpurpose>
+        <refpurpose>deleta uma janela de gráficos <emphasis role="bold">(obsolete)</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Seqüência de Chamamento</title>
-        <synopsis>xdel([win-nums])</synopsis>
+        <synopsis>
+            xdel()
+            xdel(win_nums)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Parâmetros</title>
     </refsection>
     <refsection>
         <title>Descrição</title>
+        <warning>
+            xdel(…) is obsolete and will be removed from Scilab 6.2. Please use close(…) instead.
+        </warning>
         <para>
             <literal>xdel</literal> deleta a janela de gráficos
             <literal>win-nums</literal> ou a janela de gráficos corrente, se não for
             fornecido nenhum argumento.
         </para>
     </refsection>
+    <refsection>
+        <title>Exemplos</title>
+        <programlisting role="example"><![CDATA[
+plot2d();
+scf();
+plot3d();
+xdel(0); // delete the first graphic
+xdel(); // delete the current figure
+ ]]></programlisting>
+    </refsection>
+    <refsection role="see also">
+        <title>Ver também</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="close">close</link>
+            </member>
+            <member>
+                <link linkend="delete">delete</link>
+            </member>
+            <member>
+                <link linkend="winsid">winsid</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection role="history">
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    xdel() declared obsolete. close() replaces it.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 857f630..43637cc 100644 (file)
             </varlistentry>
             <varlistentry>
                 <term>
-                    <link linkend="xdel">xdel</link>
+                    <link linkend="close">close</link>
                 </term>
                 <listitem>
                     <para>Удаление графического окна</para>
index 7774ffa..aa2f9d7 100644 (file)
                 <link linkend="close">close</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
+                <link linkend="who">who</link>
+            </member>
+            <member>
+                <link linkend="file">file()</link>
+            </member>
+            <member>
+                <link linkend="dispfiles">dispfiles</link>
             </member>
         </simplelist>
     </refsection>
index f11135b..1a8d621 100644 (file)
 <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="xdel">
     <refnamediv>
         <refname>xdel</refname>
-        <refpurpose>удаление графического окна</refpurpose>
+        <refpurpose>удаление графического окна <emphasis role="bold">(устарела)</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
-        <synopsis>xdel([win_nums])</synopsis>
+        <synopsis>
+            xdel()
+            xdel(win_nums)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Аргументы</title>
     </refsection>
     <refsection>
         <title>Описание</title>
+        <warning>
+          <literal>xdel(…)</literal> устарела и будет удалена из Scilab 6.2. Пожалуйста, используйте
+          вместо неё <literal>close(…)</literal>.
+        </warning>
         <para>
             Функция <function>xdel</function> удаляет те графические окна, чьи
             номера включены в вектор <varname>win_nums</varname>, либо текущее
@@ -65,4 +72,15 @@ xdel(); // удалить текущее окно
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    xdel() объявлена устаревшей. Её заменяет close().
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 89e7825..2462027 100644 (file)
@@ -44,7 +44,7 @@ function xload(fil,num)
         uid = h.uid
         xloadFigure(fil)
         if gcf().uid~=uid   // load() has opened a new figure
-            xdel(h.figure_id)
+            close(h)
             gcf().figure_id = num
         end
         return
index 5559f1f..9318e7a 100644 (file)
@@ -27,6 +27,7 @@
 #include "getPropertyAssignedValue.h"
 #include "FigureList.h"
 #include "Scierror.h"
+#include "sciprint.h"
 #include "HandleManagement.h"
 
 #include "deleteGraphicObject.h"
@@ -35,6 +36,9 @@
 /*--------------------------------------------------------------------------*/
 int sci_xdel(char *fname, void *pvApiCtx)
 {
+    sciprint(_("%s: Feature %s is obsolete and will be permanently removed in Scilab %s\n"), _("Warning"), "xdel(…)", "6.2");
+    sciprint(_("%s: Please use %s instead.\n"), _("Warning"), "close(…)");
+
     SciErr sciErr;
 
     int* piAddrl1 = NULL;
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_1025.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_1025.dia.ref
deleted file mode 100644 (file)
index 410bdb6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2005-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 1025 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=1025
-//
-// <-- Short Description -->
-//    winsid ne marche pas.
-scf(1000);
-scf(0);
-A = winsid();
-if or(A <> [1000,0]) then bugmes();quit;end
-xdel(winsid());
index 987a7f8..16bb08c 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 1025 -->
 //
@@ -19,4 +20,4 @@ scf(1000);
 scf(0);
 A = winsid();
 if or(A <> [1000,0]) then pause,end
-xdel(winsid());
\ No newline at end of file
+close(winsid());
\ No newline at end of file
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_11738.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_11738.dia.ref
deleted file mode 100644 (file)
index 562215f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2012 - Scilab Enterprises - Cedric Delamarre
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 11738 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=11738
-//
-// <-- Short Description -->
-// xsave + xload : bad and very slow rendering
-scf(0);
-clf;
-plot();
-f=gcf();
-nbrChild = size(f.children());
-xsave("test.scg",0);
-xdel(0);
-xload("test.scg");
-f=gcf();
-assert_checkequal(size(f.children), nbrChild);
index 6e316bc..022abaf 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 11738 -->
 //
@@ -21,7 +22,7 @@ plot();
 f=gcf();
 nbrChild = size(f.children());
 xsave("test.scg",0);
-xdel(0);
+close(0);
 xload("test.scg");
 
 f=gcf();
index 18ec3f1..09515b7 100644 (file)
@@ -18,7 +18,7 @@
 //  invisible or almost invisible.
 
 colordef("none")
-xdel(winsid())
+close(winsid())
 scf(1);
 param3d(), xtitle("General title","X title","Y title", "Z title")
 scf(2);
@@ -26,7 +26,7 @@ plot(), xtitle("General title","X title","Y title")
 // Check that titles are well visible in white
 
 colordef("black")
-xdel(winsid())
+close(winsid())
 scf(1);
 param3d(), xtitle("General title","X title","Y title", "Z title")
 scf(2);
@@ -34,7 +34,7 @@ plot(), xtitle("General title","X title","Y title")
 // Check that titles are well visible in white
 
 colordef("white")
-xdel(winsid())
+close(winsid())
 scf(1);
 param3d(), xtitle("General title","X title","Y title", "Z title")
 scf(2);
@@ -42,7 +42,7 @@ plot(), xtitle("General title","X title","Y title")
 // Check that titles are well visible in black on grey (unchanged)
 
 colordef("default")
-xdel(winsid())
+close(winsid())
 scf(1);
 param3d(), xtitle("General title","X title","Y title", "Z title")
 scf(2);
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_1587.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_1587.dia.ref
deleted file mode 100644 (file)
index 61db320..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2006-2008 - INRIA - Jean-Baptiste SILVY <jean-baptiste.silvy@inria.fr>
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 1587 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=1587
-//
-// <-- Short Description -->
-//    Changing the colormap with the graphic editor of a not selected figure do not
-//    modify the colormap as expected. The colormap of the figure which should be
-//    modified is not the entered one. The selected figure colormap is also changed
-//    with the entered colormap. Moreover, Scilab often crash some time after this bug
-//    occures.
-// test the modification on a figure which is not current
-f1 = gcf() ;
-plot3d ;
-f2 = scf() ;
-hc = jetcolormap(21) ;
-f2.color_map = hc ;
-plot3d ;
-// change the colormap of the first window
-jc = jetcolormap(45) ;
-f.color_map = jc ;
-// check that the colormaps are well copied
-if abs( max( f.color_map - jc ) ) > 1e-8 then bugmes();quit;end
-if abs( max(f2.color_map)-max(hc) ) > 1e-8 then bugmes();quit;end
-xdel(winsid());
index deb7298..e5e98d5 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 1587 -->
 //
@@ -35,4 +36,4 @@ f.color_map = jc ;
 // check that the colormaps are well copied
 if abs( max( f.color_map - jc ) ) > 1e-8 then pause,end
 if abs( max(f2.color_map)-max(hc) ) > 1e-8 then pause,end
-xdel(winsid());
\ No newline at end of file
+close(winsid());
\ No newline at end of file
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_1682.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_1682.dia.ref
deleted file mode 100644 (file)
index 72e0032..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2006-2008 - INRIA - Jean-Baptiste SILVY <jean-baptiste.silvy@inria.fr>
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 1682 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=1682
-//
-// <-- Short Description -->
-//    Scilab 4.0 RC1 under Windows XP
-//    The field Figure.rotation_style="multiple" does not work correctly.
-//
-//    The rotation of the axes of the first system by the change of the field
-//    Axes.rotation_angles does not force the rotation of the second one.
-//
-//    When making a manual rotation, it works.
-//
-//    Jacques-Deric
-disp ("4.21.51A");
-  "4.21.51A"
-hf                = scf (1);
-hf.figure_name    = "4.21.51A";
-hf.background     = 32;
-hf.rotation_style = "multiple";
-subplot (1, 2, 1);
-xfrect (0, 1, 1, 1);
-hr1               = gce ();
-hr1.background    = 2;
-hr1.fill_mode     = "on";
-ha1               = hr1.parent; // get the axes
-subplot (1, 2, 2);
-xfrect (0, 1, 1, 1);
-hr2               = gce ();
-hr2.background    = 3;
-hr2.fill_mode     = "on";
-ha2               = hr2.parent; // get the axes
-newAngles           = [60,200] ;
-ha1.rotation_angles = newAngles ;
-// check if both axes are turned
-if ( (ha1.rotation_angles <> newAngles) | (ha2.rotation_angles <> newAngles) ) then bugmes();quit;end
-xdel(winsid());
index 9868c5b..499acff 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 1682 -->
 //
@@ -48,4 +49,4 @@ ha1.rotation_angles = newAngles ;
 
 // check if both axes are turned
 if ( (ha1.rotation_angles <> newAngles) | (ha2.rotation_angles <> newAngles) ) then pause,end
-xdel(winsid());
\ No newline at end of file
+close(winsid());
\ No newline at end of file
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_1902.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_1902.dia.ref
deleted file mode 100644 (file)
index d01c7dc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2006-2008 - INRIA - Jean-Baptiste SILVY <jean-baptiste.silvy@inria.fr>
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 1902 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=1902
-//
-// <-- Short Description -->
-//    in drawlater mode the bounding box of strings may be wrong
-// draw later part
-drawlater() ;
-xstring(0,0,["toto","titi";"tatapjp","iiih"]) ;
-e             = gce();
-box11         = stringbox(e);
-a             = gca() ;
-a.data_bounds = [-2,-2;7,7] ;
-box21         = stringbox(e);
-a.view        = "3d";
-box31         = stringbox(e);
-a.data_bounds = [0,-1,3;6,7,8];
-box41         = stringbox(e);
-box51         = stringbox("toto", 1, 1, 90);
-drawnow();
-clf();
-// same as first part but wthout drawlater
-xstring(0,0,["toto","titi";"tatapjp","iiih"]) ;
-sleep(200);//Wait for MVC update
-e             = gce();
-box12         = stringbox(e);
-a             = gca();
-a.data_bounds = [-2,-2;7,7] ;
-box22         = stringbox(e);
-a.view        = "3d";
-box32         = stringbox(e);
-a.data_bounds = [0,-1,3;6,7,8] ;
-box42         = stringbox(e);
-box52         = stringbox("toto", 1, 1, 90);
-// bounding box should be the same either we are in drawlater or not.
-if (  norm( box11 - box12 ) >= 0.1 ..
-    | norm( box21 - box22 ) >= 0.1 ..
-    | norm( box31 - box32 ) >= 0.1 ..
-    | norm( box41 - box42 ) >= 0.1 ..
-| norm( box51 - box52 ) >= 0.1 )  then bugmes();quit;end
-xdel(winsid());
index d4fe6c9..fb242fe 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 1902 -->
 //
@@ -54,4 +55,4 @@ if (  norm( box11 - box12 ) >= 0.1 ..
     | norm( box31 - box32 ) >= 0.1 ..
     | norm( box41 - box42 ) >= 0.1 ..
 | norm( box51 - box52 ) >= 0.1 )  then pause,end
-xdel(winsid());
+close(winsid());
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_2045.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_2045.dia.ref
deleted file mode 100644 (file)
index b762e48..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2006-2008 - INRIA - Jean-Baptiste SILVY <jean-baptiste.silvy@inria.fr>
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 2045 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=2045
-//
-// <-- Short Description -->
-//    xpolys([],[],-1)
-//    kills scilab
-// should not draw anything
-xpolys([],[],-1) ;
-entity = gce() ;
-if ( entity.type <> "Axes" ) then bugmes();quit;end
-xpoly([],[]) ;
-// should create an empty polyline
-entity = gce() ;
-if ( entity.type <> "Polyline" )  then bugmes();quit;end
-if ( size(entity.data) <> [0,0] ) then bugmes();quit;end
-// check if scilab don't crash
-plot3d ;
-entity.data = rand(100,2) ;
-entity.data = [] ;
-xdel(winsid()) ;
-// check if nothing is broken
-xpolys(rand(12,12), rand(12,12) ) ;
-entity = gce();
-if ( entity.type <> "Compound" )   then bugmes();quit;end
-if ( size(entity.children) <> 12 ) then bugmes();quit;end
-delete(gca());
-xpoly( rand(1,12), rand(1,12) ) ;
-entity = gce();
-if ( entity.type <> "Polyline" )   then bugmes();quit;end
index 4431c3b..cbf306a 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 2045 -->
 //
@@ -31,7 +32,7 @@ if ( size(entity.data) <> [0,0] ) then pause,end
 plot3d ;
 entity.data = rand(100,2) ;
 entity.data = [] ;
-xdel(winsid()) ;
+close(winsid()) ;
 
 // check if nothing is broken
 xpolys(rand(12,12), rand(12,12) ) ;
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_2124.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_2124.dia.ref
deleted file mode 100644 (file)
index 2c5ef72..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008-2008 - INRIA - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 2124 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=2124
-//
-// <-- Short Description -->
-// Gif files generated by Scilab seem to contains some errors.
-plot2d;
-fig = gcf();
-xs2gif(fig.figure_id,TMPDIR+'/foo.gif') ;
-// open the exported fig and check that there is no warnings.
-xdel(winsid());
index 260b98a..3173cfc 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 2124 -->
 //
@@ -21,5 +22,5 @@ fig = gcf();
 xs2gif(fig.figure_id,TMPDIR+'/foo.gif') ;
 
 // open the exported fig and check that there is no warnings.
-xdel(winsid());
+close(winsid());
 
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_2577.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_2577.dia.ref
deleted file mode 100644 (file)
index a0ceddc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008-2008 - INRIA - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 2577 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=2577
-//
-// <-- Short Description -->
-// reference (for immediate display on the shell) to an invalid graphic handle
-// opens an empty graphic window, if there is none open,
-// besides giving the right error
-//
-xdel(winsid())
-h=scf(0);
-delete(h);
-// a call to h should not open a window
-if is_handle_valid(h)<>%f then bugmes();quit;end;
-// no window should have been created
-if (winsid() <> []) then bugmes();quit;end
index e2ef82a..4797963 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 2577 -->
 //
@@ -18,7 +19,7 @@
 // besides giving the right error
 // 
 
-xdel(winsid())
+close(winsid())
 h=scf(0);
 delete(h);
 
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_3036.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_3036.dia.ref
deleted file mode 100644 (file)
index 81bb763..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008 - DIGITEO - Allan CORNET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 3036 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=3036
-//
-// <-- Short Description -->
-// After a stacksize problem (lack of memory) during a surface plot, it is no longer possible to plot in the graphics window: nothing appears.
-xdel(winsid());
-x=linspace(-%pi,%pi,1000)';
-ierr = execstr("surf(x,x,sin(x)*cos(x)'');","errcatch");
-if ierr <> 0 then bugmes();quit;end
-x=linspace(-%pi,%pi,100)';
-plot(x,x);
-curfig = gcf();
-if curfig.figure_id <> 0 then bugmes();quit;end;
-plot();
index c56388c..4142e3a 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 3036 -->
 //
@@ -15,7 +16,7 @@
 // <-- Short Description -->
 // After a stacksize problem (lack of memory) during a surface plot, it is no longer possible to plot in the graphics window: nothing appears.
 
-xdel(winsid());
+close(winsid());
 x=linspace(-%pi,%pi,1000)';
 ierr = execstr("surf(x,x,sin(x)*cos(x)'');","errcatch");
 if ierr <> 0 then pause,end
index a2e823d..84801ff 100644 (file)
@@ -52,7 +52,7 @@ for i=1:5:100
           xsetech([0,0.5,1,0.5]),
           plot2d3('enn',1,t3(origen+v(1):origen+v(2))',2);
           xclick();
-          xdel();
+          close();
     end  
     clf();
 end;
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_3903.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_3903.dia.ref
deleted file mode 100644 (file)
index 7141b62..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2009-2009 - Digiteo - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 3903 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=3903
-//
-// <-- Short Description -->
-// "xdel" of a non existent window crash Scilab
-//
-// close all figures
-xdel(winsid());
-// try to delete a non existent window
-execstr("xdel(-1)", "errcatch");
-// create a figure
-f = scf(123456);
-// destroy it
-delete(f);
-// try again
-execstr("xdel(123456)", "errcatch");
-scf(1);
-scf(10);
-// figure with id 9 does not exist
-execstr("xdel([1, 10, 9])", "errcatch");
-// check that last call to xdel was canceled and did not destroy any window.
-if (winsid() <> [1, 10]) then bugmes();quit;end
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_3903.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_3903.tst
deleted file mode 100644 (file)
index b51d112..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2009-2009 - Digiteo - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-
-// <-- TEST WITH GRAPHIC -->
-
-// <-- Non-regression test for bug 3903 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=3903
-//
-// <-- Short Description -->
-// "xdel" of a non existent window crashes Scilab
-// 
-
-// close all figures
-xdel(winsid());
-
-
-// try to delete a non existent window
-execstr("xdel(-1)", "errcatch");
-
-// create a figure
-f = scf(123456);
-// destroy it
-delete(f);
-// try again
-execstr("xdel(123456)", "errcatch");
-
-scf(1);
-scf(10);
-// figure with id 9 does not exist
-execstr("xdel([1, 10, 9])", "errcatch");
-
-// check that last call to xdel was canceled and did not destroy any window.
-if (winsid() <> [1, 10]) then pause; end
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_4221.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_4221.dia.ref
deleted file mode 100644 (file)
index c943d1e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2009 - Digiteo - Jean-Baptiste Silvy
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 4221 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=4221
-//
-// <-- Short Description -->
-// graypolarplot uses to much memory.
-// 
-rho=1:256;
-theta=(1:360)./180.*%pi;
-z=30+round(theta'*(1+rho.^2));
-f=gcf();
-f.color_map= hotcolormap(128);
-clf();
-graypolarplot(theta,rho,z);
-xdel(winsid());
-// It's just a 256x360 matrix, it should not complain about memory
index 41e9724..74a1f94 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 4221 -->
 //
@@ -23,6 +24,6 @@ f=gcf();
 f.color_map= hotcolormap(128);
 clf();
 graypolarplot(theta,rho,z);
-xdel(winsid());
+close(winsid());
 
 // It's just a 256x360 matrix, it should not complain about memory
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_487.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_487.dia.ref
deleted file mode 100644 (file)
index 0deaf63..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) ????-2008 - INRIA
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 487 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=487
-//
-// <-- Short Description -->
-//    Bug Report Id: 12195200378121313
-//      According to the manual of "contour2d" a vector instead of a scalar should also be possible for the level values of the contourplot. But scilab-2.7 gives me an error.
-//
-//    I must admit that I am not an experienced user concerning scilab. Maybe I have someting overseen, but I don't known what.
-//
-//    Could you please help me?
-//
-//    On Scilab 2.7 with " contour2d " function
-//    The Error Messages are:
-//       !--error   204
-//    Argument   2, wrong type argument: expecting a scalar
-//    at line       3 of function contour2d                called by :
-//        contour2d(rhogit,zgit,Jv, lvl, strf="041");
-//
-//    Commands: lvl in contour2d is a vector
-//
-//    lvl= -0.0003 + (1:10)*(0.0003-(-0.0003))/(10+1)
-//
-//
-//    Kappen on Linux version 2.4 distribution Debian woody with  gnome1.4 Sawfish as window manager
-// ...
-lvl = -0.0003 + (1:10)*(0.0003-(-0.0003))/(10+1);
-if execstr("contour2d(1:10,1:10,rand(10,10),lvl,rect=[0,0,11,11])","errcatch","n")<>0 then bugmes();quit;end
-xdel()
index 63e8a09..0f3dfeb 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 487 -->
 //
@@ -38,4 +39,4 @@
 lvl = -0.0003 + (1:10)*(0.0003-(-0.0003))/(10+1);
 
 if execstr("contour2d(1:10,1:10,rand(10,10),lvl,rect=[0,0,11,11])","errcatch","n")<>0 then pause,end
-xdel()
+close()
index 515fbac..7c9a70a 100644 (file)
 // clf() could erase the ATOMS GUI or the m2sci ones
 
 // ============ ATOMS GUI ===========
-xdel(winsid());
+close(winsid());
 atomsGui();
 clf
 // CHECK:
 // * the ATOMS GUI must not be erased
 // * a new empty figure must have been created
 
-xdel(winsid());
+close(winsid());
 plot()
 atomsGui();
 clf
@@ -31,7 +31,7 @@ clf
 // * despite it is the latest one, the ATOMS GUI must not be erased
 // * the plot() figure must have been cleared
 
-xdel(winsid());
+close(winsid());
 plot()
 scf(); plot2d()
 atomsGui();
@@ -42,14 +42,14 @@ clf
 
 // ============ m2sci GUI ===========
 
-xdel(winsid());
+close(winsid());
 m2sci_gui();
 clf
 // CHECK:
 // * the m2sci GUI must not be erased
 // * a new empty figure must have been created
 
-xdel(winsid());
+close(winsid());
 plot()
 m2sci_gui();
 clf
@@ -57,7 +57,7 @@ clf
 // * despite it is the latest one, the m2sci GUI must not be erased
 // * the plot() figure must have been cleared
 
-xdel(winsid());
+close(winsid());
 plot()
 scf(); plot2d()
 m2sci_gui();
index d606fc5..34a7c2c 100644 (file)
 // <-- Short Description -->
 // All demos in graphics/animations are automatically closed at the end of each one
 
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim1","anim1.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim2","anim2.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim3","anim3.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim4","anim4.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim5","anim5.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim6","anim6.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim7","anim7.sce");
 exec(path_demo,-1);
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim8","anim8.sci");
 exec(path_demo,-1);
 demo_riemann();
 assert_checkequal(winsid(), 100001);
-xdel(winsid());
+close(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","bubbleSort","bubbleSort.sci");
 exec(path_demo,-1);
 demo_bubbleSort();
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_H.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_H.dia.ref
deleted file mode 100644 (file)
index 0e1155f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) ????-2008 - INRIA
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug H -->
-//
-// <-- OLD BUG -->
-//
-// Une option de contour2d a ete oubliee dans la version 2.7
-result = execstr("contour2d(1:10,1:10,rand(10,10),[0.1 0.5 0.9])","errcatch","n");
-xdel();
-if result <> 0 then bugmes();quit;end
index b3adcaa..1db6e1b 100644 (file)
@@ -6,7 +6,8 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
-
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug H -->
 //
 // <-- OLD BUG -->
@@ -14,5 +15,5 @@
 // Une option de contour2d a ete oubliee dans la version 2.7
 
 result = execstr("contour2d(1:10,1:10,rand(10,10),[0.1 0.5 0.9])","errcatch","n");
-xdel();
+close();
 if result <> 0 then pause,end
index 134fd0e..bba511e 100644 (file)
@@ -110,4 +110,4 @@ locate(-1,1)
 //     r) locate() must return one [x;y] column of coordinates
 
 // -------------------------------------------------------------------
-xdel([0 10])
+close([0 10])
diff --git a/scilab/modules/graphics/tests/unit_tests/swap_handles.dia.ref b/scilab/modules/graphics/tests/unit_tests/swap_handles.dia.ref
deleted file mode 100644 (file)
index 5fc9fde..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2006-2008 - INRIA - Jean-Baptiste SILVY <jean-baptiste.silvy@inria.fr>
-// Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// first test : swap two brothers
-a1 = gca() ;
-xrect(0.1,0.1,0.1,0.1);
-xx =-3:0.1:3 ;
-plot(xx,xx);
-swap_handles(a1.children(1), a1.children(2) ) ;
-if ( a1.children(1).type <> "Rectangle" ) then bugmes();quit;end
-if ( a1.children(2).type <> "Compound"  ) then bugmes();quit;end
-// second test : swap two objects from different figure
-scf() ;
-a2 = gca() ;
-xarc( 0.5,0.5,0.5,0.5,0,64 * 360 ) ;
-e = gce() ;
-swap_handles( e, a1.children(1) ) ;
-if ( a1.children(1).type <> "Arc" ) then bugmes();quit;end
-if ( a2.children(1).type <> "Rectangle" ) then bugmes();quit;end
-assert_checkerror("swap_handles(e, a1)", msprintf(_("%s: Handles do not have the same parent type neither the same type.\n"), "swap_handles"));
-// third test : swap two objects from different figure
-xdel( winsid() ) ;
-plot3d ;
-a1 = gca() ;
-e1 = gce() ;
-scf() ;
-plot2d ;
-e2 = gce() ;
-a2 = gca() ;
-swap_handles( e1, e2 ) ;
-if ( e1.parent <> a2 ) then bugmes();quit;end
-if ( e2.parent <> a1 ) then bugmes();quit;end
-// fourth test : swap two handles from two different figures
-xdel( winsid() ) ;
-plot3d ;
-f1 = gcf() ;
-a1 = gca() ;
-scf() ;
-plot2d ;
-f2 = gcf() ;
-a2 = gca() ;
-swap_handles( a1, a2 ) ;
-if ( a1.parent <> f2 ) then bugmes();quit;end
-if ( a2.parent <> f1 ) then bugmes();quit;end
-xdel( winsid() ) ;
index 75f324b..61905a8 100644 (file)
@@ -7,6 +7,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // first test : swap two brothers
 a1 = gca() ;
@@ -31,7 +32,7 @@ if ( a2.children(1).type <> "Rectangle" ) then pause,end
 assert_checkerror("swap_handles(e, a1)", msprintf(_("%s: Handles do not have the same parent type neither the same type.\n"), "swap_handles"));
 
 // third test : swap two objects from different figure
-xdel( winsid() ) ;
+close( winsid() ) ;
 plot3d ;
 a1 = gca() ;
 e1 = gce() ;
@@ -46,7 +47,7 @@ if ( e1.parent <> a2 ) then pause,end
 if ( e2.parent <> a1 ) then pause,end
 
 // fourth test : swap two handles from two different figures
-xdel( winsid() ) ;
+close( winsid() ) ;
 plot3d ;
 f1 = gcf() ;
 a1 = gca() ;
@@ -61,4 +62,4 @@ swap_handles( a1, a2 ) ;
 if ( a1.parent <> f2 ) then pause,end
 if ( a2.parent <> f1 ) then pause,end
 
-xdel( winsid() ) ;
+close( winsid() ) ;
index dff0592..eb16bd6 100644 (file)
@@ -27,7 +27,7 @@ xsave(graypolar)
 
 // 1) Loading a whole figure in a new window
 // -----------------------------------------
-xdel(winsid())
+close(winsid())
 plot2d()            // #0
 xload(graypolar, 10)
 // ----- CHECK -----
@@ -38,7 +38,7 @@ xload(graypolar, 10)
 
 // 2) Loading a figure into the gcf() existing one (merging, since Scilab 6.0)
 // ---------------------------------------------------------------------------
-xdel(winsid())
+close(winsid())
 scf();  // #0
 subplot(1,2,1)
 plot2d()
@@ -52,7 +52,7 @@ xload(graypolar) // in gcf()
 
 // 3) Same as 2) with the explicit number of an existing figure
 // ------------------------------------------------------------
-xdel(winsid())
+close(winsid())
 subplot(1,2,1) // #0
 plot2d()
 scf(7);
@@ -66,7 +66,7 @@ xload(graypolar, 0) // NOT in gcf()
 
 // 4) Loading a figure into an empty scf()
 // ---------------------------------------
-xdel(winsid())
+close(winsid())
 scf();  // preopened empty #0
 // Please dock the figure #0 anywhere you want
 xload(graypolar)
@@ -83,7 +83,7 @@ assert_checkequal(length(gcf().children), 1); // the default axes must have been
 // ------------------------------------------------------------------------
 // Preparing the file
 legended = path+"/legended.dat";
-xdel(winsid())
+close(winsid())
 h = scf();
 x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);
 subplot(1,2,2)
@@ -92,7 +92,7 @@ legends(['Sin','Cos'],1:2,"ur")
 save(legended, "h")
 
 //  5.a) in a new scf() figure
-xdel(winsid())
+close(winsid())
 scf();  // Here you may dock the figure
 xload(legended)
 // ----- CHECK -----
@@ -101,7 +101,7 @@ xload(legended)
 //   on the top right
 
 //  5.b) in an existing non empty figure
-xdel(winsid())
+close(winsid())
 subplot(1,2,1)
 plot2d()
 xload(legended)
@@ -123,7 +123,7 @@ save(graypolar, "a"); // now we save ONLY the AXES
 
 // 6) in a new figure to be created
 // --------------------------------
-xdel(winsid())
+close(winsid())
 plot2d();
 xload(graypolar,10)
 assert_checkequal(gcf().figure_id, 10);
@@ -133,7 +133,7 @@ assert_checkequal(gcf().figure_id, 10);
 
 // 7) after scf(), in gcf()
 // ------------------------
-xdel(winsid())
+close(winsid())
 plot2d();
 scf();
 xload(graypolar)
@@ -144,7 +144,7 @@ assert_checkequal(gcf().figure_id, 1);
 
 // 8) in the current non-empty figure
 // ----------------------------------
-xdel(winsid())
+close(winsid())
 subplot(1,2,1), plot2d();
 xload(graypolar)
 // ----- CHECK -----
@@ -154,7 +154,7 @@ xload(graypolar)
 
 // 9) in a NOT-current non-empty figure
 // ------------------------------------
-xdel(winsid())
+close(winsid())
 subplot(1,2,1), plot2d();
 scf();
 xload(graypolar, 0)
index 8a2b17b..d0335e2 100644 (file)
@@ -54,7 +54,7 @@
                 if (findobj("figure_id",[SCILAB_FIGURE_ID]).event_handler_enable == "on" );
                     execstr(findobj("figure_id",[SCILAB_FIGURE_ID]).event_handler +"([SCILAB_FIGURE_ID], -1, -1, -1000)", "errcatch", "m");
                 end;
-                xdel([SCILAB_FIGURE_ID]);'
+                close([SCILAB_FIGURE_ID]);'
                 type="0"/>
         </submenu>
     </menu>
index 8b1263e..8d73ef5 100644 (file)
@@ -1,5 +1,7 @@
 <?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="close">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="close">
     <refnamediv>
         <refname>close</refname>
         <refpurpose>closes graphic figures, progressionbars or waitbars</refpurpose>
@@ -17,8 +19,8 @@
             <varlistentry>
                 <term>H</term>
                 <listitem>
-                    <para>Handle or vector of handles of graphic figures or progression bar
-                        or wait bar. These different types of handles can be mixed in <varname>H</varname>.
+                    <para>Vector of graphic figures handles or ids, or of handles of progression bar
+                        or wait bar.
                     </para>
                     <para>
                         By default, the current graphic figure is considered.
@@ -56,15 +58,21 @@ close(h);  // close figure 1
 wid1=progressionbar("Message");
 // close it
 close(wid1);
+
+// Create and close several figures in a once:
+scf(111); plot
+scf(25); plot2d
+gcf().figure_position(1) = 500;
+scf(200); param3d
+gcf().figure_position(1) = 700;
+sleep(5000);         // Watch at them!
+close([25 200 111])  // Finished!
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="xdel">xdel</link>
-            </member>
-            <member>
                 <link linkend="delete">delete</link>
             </member>
             <member>
@@ -78,4 +86,15 @@ close(wid1);
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    Vector of several figures ids now accepted.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 88cdad5..cc7e4c3 100644 (file)
@@ -1,16 +1,27 @@
 <?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="close">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="close">
     <refnamediv>
         <refname>close</refname>
         <refpurpose>図を閉じる</refpurpose>
     </refnamediv>
+    <refsynopsisdiv>
+        <title>Syntax</title>
+        <synopsis>
+            close
+            close(h)
+        </synopsis>
+    </refsynopsisdiv>
     <refsection>
         <title>引数</title>
         <variablelist>
             <varlistentry>
                 <term>h</term>
                 <listitem>
-                    <para>整数,閉じるウインドウのハンドル.</para>
+                    <para>Vector of graphic figures handles or ids, or of handles of progression bar
+                        or wait bar.
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
@@ -42,6 +53,15 @@ close();
 // カレントのグラフィックウインドウ(すなわち図2)を閉じる
 close(h);
 // 図1を閉じる
+
+// Create and close several figures in a once:
+scf(111); plot
+scf(25); plot2d
+gcf().figure_position(1) = 500;
+scf(200); param3d
+gcf().figure_position(1) = 700;
+sleep(5000);         // Watch at them!
+close([25 200 111])  // Finished!
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -54,11 +74,19 @@ close(h);
                 <link linkend="gcf">gcf</link>
             </member>
             <member>
-                <link linkend="xdel">xdel</link>
-            </member>
-            <member>
                 <link linkend="delete">delete</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    Vector of several figures ids now accepted.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
diff --git a/scilab/modules/gui/help/ru_RU/close.xml b/scilab/modules/gui/help/ru_RU/close.xml
new file mode 100644 (file)
index 0000000..1e923b8
--- /dev/null
@@ -0,0 +1,105 @@
+<?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:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="close">
+    <refnamediv>
+        <refname>close</refname>
+        <refpurpose>
+            закрывает графические окна, панели прогресса и панели состояния
+        </refpurpose>
+    </refnamediv>
+    <refsynopsisdiv>
+        <title>Синтаксис</title>
+        <synopsis>
+            close
+            close(H)
+        </synopsis>
+    </refsynopsisdiv>
+    <refsection role="parameters">
+        <title>Аргументы</title>
+        <variablelist>
+            <varlistentry>
+                <term>H</term>
+                <listitem>
+                    <para>
+                        вектор дескрипторов графических окон или идентификаторов,
+                        либо дескрипторов панели прогресса и панели состояния.
+                    </para>
+                    <para>
+                        По умолчанию рассматривается текущее графическое окно.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="description">
+        <title>Описание</title>
+        <para>
+            Графические окна, основанные на технологии Tk (такие, как по-прежнему
+            используемое imshow() во внешнем модуле SIVP), могут быть закрыты
+            также по указанию их номера, который является их дескриптором.
+        </para>
+    </refsection>
+    <refsection role="examples">
+        <title>Примеры</title>
+        <programlisting role="example"><![CDATA[
+// создаём окно номер 1.
+h = scf();
+// разместим чёткий текст в окне 1
+uicontrol( h, 'style','text', ...
+              'string','scilab is great', ...
+              'position',[50 70 100 100], ...
+              'fontsize',15);
+// создаём окно номер 2
+scf();
+// разместим текст в окне 2
+uicontrol( 'style','text', ...
+           'string','Really great', 'position',[50 70 100 100], 'fontsize',15);
+
+close();   // закрываем текущее графическое окно (т.е. номер 2)
+close(h);  // закрываем окно 1
+
+// создаём панель прогресса
+wid1=progressionbar("Message");
+// закроем его
+close(wid1);
+
+// Создаём и закрываем несколько окон за раз:
+scf(111); plot
+scf(25); plot2d
+gcf().figure_position(1) = 500;
+scf(200); param3d
+gcf().figure_position(1) = 700;
+sleep(5000);         // смотрим на них!
+close([25 200 111])  // конец!
+ ]]></programlisting>
+    </refsection>
+    <refsection role="see also">
+        <title>Смотрите также</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="delete">delete</link>
+            </member>
+            <member>
+                <link linkend="figure">figure</link>
+            </member>
+            <member>
+                <link linkend="scf">scf</link>
+            </member>
+            <member>
+                <link linkend="gcf">gcf</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.1</revnumber>
+                <revdescription>
+                    Теперь принимаются идентификаторы нескольких окон.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
index 9f44e9c..dc95907 100644 (file)
@@ -1,7 +1,7 @@
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2008 - INRIA - Vincent COUVERT
-//
 // Copyright (C) 2012 - 2016 - Scilab Enterprises
+// Copyright (C) 2020 - 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.
@@ -25,16 +25,19 @@ function close(h)
         end
     else
         if type(h) == 9 then // Graphics handle
-            delete(h);
-        elseif type(h) == 1 then // Assumed to be an old TK figure
-            ierr = execstr("figureExists = ~isempty(find(winsid()==get(h,""figure_id"")))", "errcatch");
-            if ~ierr & figureExists then
-                delete(scf(h));
+            delete(h)
+
+        elseif type(h) == 1 then // vector of Figures ids
+            for i = 1:length(h)
+                tmp = findobj("figure_id",h(i));
+                if tmp <> [] then
+                    delete(tmp);
+                end
             end
+
         else
             // Do not know what to do
             error(msprintf(gettext("%s: Wrong type for input argument #%d: A graphic handle or a real expected.\n"), "close", 1));
         end
     end
 endfunction
-
index 2398a58..653b308 100644 (file)
@@ -20,7 +20,7 @@ Matplot()
 f = gcf();
 save(TMPDIR+"/Matplot.sod","f")
 d0 = gca().children.data;
-xdel()
+close()
 load(TMPDIR+"/Matplot.sod")
 d1 = gca().children.data;
 
index fa1c31b..459a3ae 100644 (file)
@@ -987,7 +987,7 @@ reglin_1.png=9b22e4b782eb58eb90e5dccd50dfb466
 reglin_2.png=109258bc122deeadf53e2b832d510201
 remezb_1.png=17a8eb044482a1871bede91c36eddf0f
 replot_1.png=d9ab231632d9298a6f87718df49ce8ae
-replot_2.png=2bbd8e5516bcfba00fb343eff77b4736
+replot_2.png=d028a3a3de7e675c9f31c8a2d7fabe17
 rotate_1.png=df252732000d1c17d23c04e038b1b0f3
 rpem_1.png=f1f661c0f1bc866f159ff8e328971f0f
 save_1.png=63b05d0803a6d3427fd26fa7cea17612
@@ -1065,7 +1065,7 @@ surf_2.png=b9d7ae605f66b95c75845c81ed273fdc
 surf_3.png=b3e7843f11e771c355271e4a86fab88c
 surf_4.png=bdd0f9ca47ebab239e0321b20131d18b
 surf_5.png=7f7cf0008764837a48ffb5f0e350765a
-surf_6.png=4ad566ed710010ec63a2ffb63da9983a
+surf_6.png=103f1fd4cfc2217fe197abd0d14febf0
 surf_7.png=d49cf32bd70642bdc7d5b50b675775fc
 surf_8.png=f14a7126b2af207ede224056e90e25ab
 surf_9.png=92cc5270fc0bd51ef3553b21774634f4
diff --git a/scilab/modules/interpolation/tests/nonreg_tests/bug_461.dia.ref b/scilab/modules/interpolation/tests/nonreg_tests/bug_461.dia.ref
deleted file mode 100644 (file)
index 162a213..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// <-- Non-regression test for bug 461 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=461
-//
-// <-- Short Description -->
-//    Bug Report Id: 11985200361815216
-//    Result  of following operations:
-//    size(s0)
-//     ans  =
-//    !   1.    43. !
-//
-//    size(s1)   // and for s2 and s3
-//     ans  =
-//    !   43.    1. !
-//    s0 is vector-row and s1, s2 s3- vector-colum
-//
-//
-//    On Scilab 2.7 with " interp " function
-//    The Error Messages are:
-//                      !--error     5
-//    inconsistent column/row dimensions
-//    Commands:  x=[0. 1.01 2.01 3. 4.02];
-//    f=[0. 1. 3.9 8.75 16.5];
-//    plot(x,f);
-//    d=splin(x,f );
-// ...
-correct=%F;
-x=[0. 1.01 2.01 3. 4.02];
-f=[0. 1. 3.9 8.75 16.5];
-plot(x,f);
-d=splin(x,f );
-xx=0:0.1:4.2;
-[s0,s1,s2,s3]=interp(xx,x,f,d);
-s0=s0';
-s1=s1';
-s2=s2';
-s3=s3';
-result=execstr("plot2d(xx,[s0 s1 s2 s3])","errcatch","n");
-xdel();
-if result<>0 then bugmes();quit;end
index 17d09f0..968ff02 100644 (file)
@@ -4,7 +4,8 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
+// <-- NO CHECK REF -->
 // <-- Non-regression test for bug 461 -->
 //
 // <-- Bugzilla URL -->
@@ -45,6 +46,6 @@ s1=s1';
 s2=s2';
 s3=s3';
 result=execstr("plot2d(xx,[s0 s1 s2 s3])","errcatch","n");
-xdel();
+close();
 
 if result<>0 then pause,end
index 3953155..fa405a2 100644 (file)
@@ -32,7 +32,7 @@
             <listitem>
                 <para>
                     When current figure is a graphic one: Scilab equivalent for Matlab <literal>close</literal>
-                    is <literal>xdel</literal> or <literal>delete</literal>
+                    is <literal>close</literal> or <literal>delete</literal>
                 </para>
             </listitem>
             <listitem>
@@ -72,9 +72,6 @@
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="xdel">xdel</link>
-            </member>
-            <member>
                 <link linkend="delete">delete</link>
             </member>
             <member>
index 32e660a..998d4da 100644 (file)
@@ -37,7 +37,7 @@ close
                 </td>
                 <td>
                     <programlisting role="example"><![CDATA[
-close - xdel - delete
+close, delete
 ]]></programlisting>
                 </td>
             </tr>
@@ -66,7 +66,7 @@ close - xdel - delete
                 <term>close('all')</term>
                 <listitem>
                     <para>
-                        Scilab equivalent for Matlab <emphasis role="bold">close('all')</emphasis> is <emphasis role="bold">xdel(winsid())</emphasis>.
+                        Scilab equivalent for Matlab <emphasis role="bold">close('all')</emphasis> is <emphasis role="bold">close(winsid())</emphasis>.
                     </para>
                 </listitem>
             </varlistentry>
@@ -82,7 +82,7 @@ close - xdel - delete
                 <term>close('all','hidden')</term>
                 <listitem>
                     <para>
-                        Scilab equivalent for Matlab <emphasis role="bold">close('all','hidden')</emphasis> is <emphasis role="bold">xdel(winsid())</emphasis> but Scilab kills all figures even if they are hidden.
+                        Scilab equivalent for Matlab <emphasis role="bold">close('all','hidden')</emphasis> is <emphasis role="bold">close(winsid())</emphasis> but Scilab kills all figures even if they are hidden.
                     </para>
                 </listitem>
             </varlistentry>
index d9a56c4..718aaf9 100644 (file)
@@ -33,7 +33,7 @@
             <listitem>
                 <para>
                     Si la fenêtre courante est une fenêtre graphique : l'équivalent Scilab pour la fonction Matlab
-                    <literal>close</literal> est <literal>xdel</literal> ou <literal>delete</literal>
+                    <literal>close</literal> est <literal>close</literal> ou <literal>delete</literal>
                 </para>
             </listitem>
             <listitem>
@@ -74,9 +74,6 @@
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
-                <link linkend="xdel">xdel</link>
-            </member>
-            <member>
                 <link linkend="delete">delete</link>
             </member>
             <member>
diff --git a/scilab/modules/m2sci/help/ru_RU/compatibility_functions/mtlb_close.xml b/scilab/modules/m2sci/help/ru_RU/compatibility_functions/mtlb_close.xml
new file mode 100644 (file)
index 0000000..65ad2c3
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+    * Copyright (C) 2004-2007 - INRIA - Vincent COUVERT
+    *
+ * 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="mtlb_close">
+    <refnamediv>
+        <refname>mtlb_close</refname>
+        <refpurpose>функция эмуляции close в Matlab</refpurpose>
+    </refnamediv>
+    <refsection>
+        <title>Описание</title>
+        <para>
+            Эквивалент Scilab для <literal>close</literal> в Matlab отличается по
+            отношению к типу текущего окна (пользовательский интерфейс или
+            графическое окно).
+        </para>
+        <itemizedlist>
+            <listitem>
+                <para>
+                    Если текущее окно является пользовательским интерфейсом:
+                    эквивалент Scilab для <literal>close</literal> в Matlab -
+                    это <literal>close</literal>.
+                </para>
+            </listitem>
+            <listitem>
+                <para>
+                    Если текущее окно является графическим:
+                    эквивалент Scilab для <literal>close</literal> в Matlab -
+                    это <literal>close</literal> или <literal>delete</literal>.
+                </para>
+            </listitem>
+            <listitem>
+                <para>
+                    В Scilab мы не получаем статуса ошибки.
+                </para>
+            </listitem>
+        </itemizedlist>
+        <para>
+            Функция <literal>mtlb_close([h])</literal> используется в
+            <literal>mfile2sci</literal> для замены <literal>close([h])</literal>,
+            когда невозможно узнать что и куда будет введено при портировании
+            кода Matlab в Scilab. Данная функция определит корректную семантику
+            во время выполнения. Если вы хотите иметь более эффективный код, то
+            можно заменить вызовы <literal>mtlb_close</literal>:
+        </para>
+        <itemizedlist>
+            <listitem>
+                <para>
+                    если <literal>h</literal> является окном интерфейса, то
+                    <literal>mtlb_close(h)</literal> может быть заменена на
+                    <literal>close(h)</literal>;
+                </para>
+            </listitem>
+            <listitem>
+                <para>
+                    если <literal>h</literal> является графическим окном, то
+                    <literal>mtlb_close(h)</literal> может быть заменена на <literal>delete(h)</literal>.
+                </para>
+            </listitem>
+        </itemizedlist>
+        <para>
+            <warning>
+                Осторожно: <literal>mtlb_close</literal> не должна использоваться
+                для функций, написанных вручную.
+            </warning>
+        </para>
+    </refsection>
+    <refsection role="see also">
+        <title>Смотрите также</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="delete">delete</link>
+            </member>
+            <member>
+                <link linkend="winsid">winsid</link>
+            </member>
+            <member>
+                <link linkend="close">close</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>
index a145d40..a5c3146 100644 (file)
@@ -33,7 +33,7 @@ function [status]=mtlb_close(h)
             close(h)
         elseif type(h)==10 then
             if h=="all" then
-                xdel(winsid())
+                close(winsid())
             else // close(name)
                 cf_save=gcf()
 
@@ -52,7 +52,7 @@ function [status]=mtlb_close(h)
         end
     else // close('all','hidden')
         warning(msprintf(gettext("%s: All windows deleted.\n"),"mtlb_close"));
-        xdel(winsid())
+        close(winsid())
     end
 endfunction
 
index 62fb21f..88864d9 100644 (file)
@@ -41,7 +41,7 @@ function [tree]=sci_close(tree)
         elseif h.vtype==String then
             if typeof(h)=="cste" then
                 if h.value=="all" then // close('all')
-                    tree.name="xdel"
+                    tree.name="close"
                     tree.rhs(1)=Funcall("winsid",1,list(),list())
                 else // close(name)
                     tree.name="mtlb_close"
@@ -54,7 +54,7 @@ function [tree]=sci_close(tree)
         end
     else // close('all','hidden')
         set_infos(gettext("All windows will be deleted."),2);
-        tree.name="xdel"
+        tree.name="close"
         tree.rhs(1)=Funcall("winsid",1,list(),list())
         tree.rhs(2)=null()
     end
index 7eab104..c623a09 100644 (file)
@@ -80,14 +80,14 @@ close
 close(h)
 
 mtlb_close("name")
-xdel(winsid())
-xdel(winsid())
+close(winsid())
+close(winsid())
 
 status = close()
 status = close(h)
 status = mtlb_close(name)
-status = xdel(winsid())
-status = xdel(winsid())
+status = close(winsid())
+status = close(winsid())
 
 
 delete(gcf())
@@ -95,11 +95,11 @@ delete(gcf())
 delete(h1)
 
 mtlb_close("name")
-xdel(winsid())
-xdel(winsid())
+close(winsid())
+close(winsid())
 
 status = delete(gcf())
 status = delete(h1)
 status = mtlb_close(name)
-status = xdel(winsid())
-status = xdel(winsid())
+status = close(winsid())
+status = close(winsid())
index b3c34fb..a0ce5fd 100644 (file)
@@ -93,7 +93,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     std::unordered_map<std::wstring, std::wstring> map;
 
     // Scilab 6.1.0 => 6.1.x
-    map.emplace(L"soundsec", L"0 : 1/freq : t*(1-%eps)");
+    map.emplace(L"xdel", L"close");
     map.emplace(L"xname", L"gcf().figure_name");
 
     // Scilab 6.0.x => 6.1.0
diff --git a/scilab/modules/string/tests/nonreg_tests/bug_12291.dia.ref b/scilab/modules/string/tests/nonreg_tests/bug_12291.dia.ref
deleted file mode 100644 (file)
index fab3d15..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-//
-// <-- TEST WITH GRAPHIC -->
-//
-// <-- Non-regression test for bug 12291 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=12291
-//
-// <-- Short Description -->
-// Unable to display a list of handle as a handle userData
-//
-set(get(0), "usedeprecatedskin", "on");
-f=figure("figure_name","UIcontrol with an handle as a user_data","figure_id",0,"auto_resize","off");
-frame=uicontrol("parent", f,"style","frame");
-child=uicontrol("parent",frame,"style","text","string","OK");
-set(frame,"userdata",list(child));
-set(f,"figure_position",[201 228]);
-set(f,"figure_size", [500 500]);
-set(f,"axes_size",[490 400]);
-res="uicontrol(''ForegroundColor'', [-1 -1 -1] ,''Relief'', ''ridge'', ''String'', '''' ,''Style'', ''frame'', ''Userdata'', list(uicontrol(''ForegroundColor'', [-1 -1 -1] ,''Relief'', ''flat'', ''String'', ''OK'' ,''Style'', ''text'')))";
-assert_checkequal(sci2exp(frame,0),res);
-assert_checktrue(execstr("frame2="+sci2exp(frame),"errcatch")==0);
-xdel(winsid())
index fab3d15..810f12f 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 //
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 //
 // <-- Non-regression test for bug 12291 -->
 //
@@ -26,4 +27,4 @@ set(f,"axes_size",[490 400]);
 res="uicontrol(''ForegroundColor'', [-1 -1 -1] ,''Relief'', ''ridge'', ''String'', '''' ,''Style'', ''frame'', ''Userdata'', list(uicontrol(''ForegroundColor'', [-1 -1 -1] ,''Relief'', ''flat'', ''String'', ''OK'' ,''Style'', ''text'')))";
 assert_checkequal(sci2exp(frame,0),res);
 assert_checktrue(execstr("frame2="+sci2exp(frame),"errcatch")==0);
-xdel(winsid())
+close(winsid())
index b220522..d827c43 100644 (file)
@@ -198,7 +198,7 @@ function demo_sparse_matrices()
            _("     computing time       = ") + string(t2_chol) + "\n")
 
     if num == max(winsid()) then
-        xdel(num);
+        close(num);
     end
 
 endfunction