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
return
else
set("figure_style","old");
- xdel();
+ close();
clf();
demoexc(num);
end
lines(oldln(1))
return
else
- xdel(0);
+ close(0);
clf();
demoex(num);
end
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,
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 -->" ];
//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);
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
%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
a1=gca();
assert_checkequal(a1.user_data, "test");
-xdel(winsid());
+close(winsid());
assert_checkequal(d.user_data, "test");
a1 = gca();
scf();
a2 = gca();
assert_checkequal(a2.user_data, "test 2");
-xdel(winsid());
+close(winsid());
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
</member>
<member>
<link linkend="gca">gca</link>
+ <member>
+ </member>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="axes_properties">axes_properties</link>
<link linkend="gcf">gcf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
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
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
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
</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>
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">
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))
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>
// 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>
<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 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>
</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
</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>
<link linkend="graphics_entities">graphics_entities</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
- </member>
- <member>
<link linkend="close">close</link>
</member>
</simplelist>
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)
</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>
</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))
// 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>
<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 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>
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
</member>
<member>
<link linkend="gca">gca</link>
+ <member>
+ </member>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="axes_properties">axes_properties</link>
<?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,<opt_args>)
-
-
-
plot3d(xf,yf,zf,[theta,alpha,leg,flag,ebox])
-
plot3d(xf,yf,zf,<opt_args>)
-
-
-
plot3d(xf,yf,list(zf,colors),[theta,alpha,leg,flag,ebox])
-
plot3d(xf,yf,list(zf,colors),<opt_args>)
-
-
-
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><opt_args></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>0</term>
-
<listitem>
-
<para>
-
曲面は色<literal>"mode"</literal>で塗られます ;
-
小平面の境界はカレントの線種と色で描画されます.
-
</para>
-
</listitem>
-
</varlistentry>
-
<varlistentry>
-
<term>mode=0:</term>
-
<listitem>
-
<para>曲面のメッシュが描画されます.</para>
-
</listitem>
-
</varlistentry>
-
<varlistentry>
-
<term>mode<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
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
-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
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
</varlistentry>
<varlistentry>
<term>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</term>
<listitem>
<para>グラフィックウインドウを削除</para>
<?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
</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))
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>
<?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
<?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
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
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)]))
<link linkend="gcf">gcf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
//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
<link linkend="clf">clf</link>
</member>
<member>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</member>
<member>
<link linkend="delete">delete</link>
</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>
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">
<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))
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>
<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 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>
</varlistentry>
<varlistentry>
<term>
- <link linkend="xdel">xdel</link>
+ <link linkend="close">close</link>
</term>
<listitem>
<para>Удаление графического окна</para>
<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 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>, либо текущее
</member>
</simplelist>
</refsection>
+ <refsection role="history">
+ <title>История</title>
+ <revhistory>
+ <revision>
+ <revnumber>6.1.1</revnumber>
+ <revdescription>
+ xdel() объявлена устаревшей. Её заменяет close().
+ </revdescription>
+ </revision>
+ </revhistory>
+ </refsection>
</refentry>
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
#include "getPropertyAssignedValue.h"
#include "FigureList.h"
#include "Scierror.h"
+#include "sciprint.h"
#include "HandleManagement.h"
#include "deleteGraphicObject.h"
/*--------------------------------------------------------------------------*/
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;
+++ /dev/null
-// =============================================================================
-// 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());
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 1025 -->
//
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
+++ /dev/null
-// =============================================================================
-// 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);
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 11738 -->
//
f=gcf();
nbrChild = size(f.children());
xsave("test.scg",0);
-xdel(0);
+close(0);
xload("test.scg");
f=gcf();
// invisible or almost invisible.
colordef("none")
-xdel(winsid())
+close(winsid())
scf(1);
param3d(), xtitle("General title","X title","Y title", "Z title")
scf(2);
// 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);
// 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);
// 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);
+++ /dev/null
-// =============================================================================
-// 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());
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 1587 -->
//
// 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
+++ /dev/null
-// =============================================================================
-// 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());
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 1682 -->
//
// 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
+++ /dev/null
-// =============================================================================
-// 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());
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 1902 -->
//
| norm( box31 - box32 ) >= 0.1 ..
| norm( box41 - box42 ) >= 0.1 ..
| norm( box51 - box52 ) >= 0.1 ) then pause,end
-xdel(winsid());
+close(winsid());
+++ /dev/null
-// =============================================================================
-// 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
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 2045 -->
//
plot3d ;
entity.data = rand(100,2) ;
entity.data = [] ;
-xdel(winsid()) ;
+close(winsid()) ;
// check if nothing is broken
xpolys(rand(12,12), rand(12,12) ) ;
+++ /dev/null
-// =============================================================================
-// 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());
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 2124 -->
//
xs2gif(fig.figure_id,TMPDIR+'/foo.gif') ;
// open the exported fig and check that there is no warnings.
-xdel(winsid());
+close(winsid());
+++ /dev/null
-// =============================================================================
-// 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
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 2577 -->
//
// besides giving the right error
//
-xdel(winsid())
+close(winsid())
h=scf(0);
delete(h);
+++ /dev/null
-// =============================================================================
-// 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();
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 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());
+close(winsid());
x=linspace(-%pi,%pi,1000)';
ierr = execstr("surf(x,x,sin(x)*cos(x)'');","errcatch");
if ierr <> 0 then pause,end
xsetech([0,0.5,1,0.5]),
plot2d3('enn',1,t3(origen+v(1):origen+v(2))',2);
xclick();
- xdel();
+ close();
end
clf();
end;
+++ /dev/null
-// =============================================================================
-// 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
+++ /dev/null
-// =============================================================================
-// 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
+++ /dev/null
-// =============================================================================
-// 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
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 4221 -->
//
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
+++ /dev/null
-// =============================================================================
-// 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()
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 487 -->
//
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()
// 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
// * 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();
// ============ 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
// * 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();
// <-- 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();
+++ /dev/null
-// =============================================================================
-// 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
// =============================================================================
// <-- TEST WITH GRAPHIC -->
-
+// <-- NO CHECK REF -->
+//
// <-- 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();
+close();
if result <> 0 then pause,end
// used to lead to deadlock in OpenGL thread.
// Scilab hanged
-xdel(winsid());
+close(winsid());
// r) locate() must return one [x;y] column of coordinates
// -------------------------------------------------------------------
-xdel([0 10])
+close([0 10])
+++ /dev/null
-// =============================================================================
-// 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() ) ;
// =============================================================================
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
// first test : swap two brothers
a1 = gca() ;
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() ;
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() ;
if ( a1.parent <> f2 ) then pause,end
if ( a2.parent <> f1 ) then pause,end
-xdel( winsid() ) ;
+close( winsid() ) ;
// 1) Loading a whole figure in a new window
// -----------------------------------------
-xdel(winsid())
+close(winsid())
plot2d() // #0
xload(graypolar, 10)
// ----- CHECK -----
// 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()
// 3) Same as 2) with the explicit number of an existing figure
// ------------------------------------------------------------
-xdel(winsid())
+close(winsid())
subplot(1,2,1) // #0
plot2d()
scf(7);
// 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)
// ------------------------------------------------------------------------
// 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)
save(legended, "h")
// 5.a) in a new scf() figure
-xdel(winsid())
+close(winsid())
scf(); // Here you may dock the figure
xload(legended)
// ----- CHECK -----
// on the top right
// 5.b) in an existing non empty figure
-xdel(winsid())
+close(winsid())
subplot(1,2,1)
plot2d()
xload(legended)
// 6) in a new figure to be created
// --------------------------------
-xdel(winsid())
+close(winsid())
plot2d();
xload(graypolar,10)
assert_checkequal(gcf().figure_id, 10);
// 7) after scf(), in gcf()
// ------------------------
-xdel(winsid())
+close(winsid())
plot2d();
scf();
xload(graypolar)
// 8) in the current non-empty figure
// ----------------------------------
-xdel(winsid())
+close(winsid())
subplot(1,2,1), plot2d();
xload(graypolar)
// ----- CHECK -----
// 9) in a NOT-current non-empty figure
// ------------------------------------
-xdel(winsid())
+close(winsid())
subplot(1,2,1), plot2d();
scf();
xload(graypolar, 0)
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>
<?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>
<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.
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>
</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>
<?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>
// カレントのグラフィックウインドウ(すなわち図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">
<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>
--- /dev/null
+<?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>
// 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.
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
-
setlookandfeel(); // system look and feel
-xdel(winsid());
+close(winsid());
f = gcf();
save(TMPDIR+"/Matplot.sod","f")
d0 = gca().children.data;
-xdel()
+close()
load(TMPDIR+"/Matplot.sod")
d1 = gca().children.data;
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
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
+++ /dev/null
-// <-- 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
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
-
+//
+// <-- NO CHECK REF -->
// <-- Non-regression test for bug 461 -->
//
// <-- Bugzilla URL -->
s2=s2';
s3=s3';
result=execstr("plot2d(xx,[s0 s1 s2 s3])","errcatch","n");
-xdel();
+close();
if result<>0 then pause,end
<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>
<title>See also</title>
<simplelist type="inline">
<member>
- <link linkend="xdel">xdel</link>
- </member>
- <member>
<link linkend="delete">delete</link>
</member>
<member>
</td>
<td>
<programlisting role="example"><![CDATA[
-close - xdel - delete
+close, delete
]]></programlisting>
</td>
</tr>
<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>
<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>
<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>
<title>Voir aussi</title>
<simplelist type="inline">
<member>
- <link linkend="xdel">xdel</link>
- </member>
- <member>
<link linkend="delete">delete</link>
</member>
<member>
--- /dev/null
+<?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>
close(h)
elseif type(h)==10 then
if h=="all" then
- xdel(winsid())
+ close(winsid())
else // close(name)
cf_save=gcf()
end
else // close('all','hidden')
warning(msprintf(gettext("%s: All windows deleted.\n"),"mtlb_close"));
- xdel(winsid())
+ close(winsid())
end
endfunction
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"
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
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())
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())
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
+++ /dev/null
-// =============================================================================
-// 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())
// =============================================================================
//
// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
//
// <-- Non-regression test for bug 12291 -->
//
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())
_(" computing time = ") + string(t2_chol) + "\n")
if num == max(winsid()) then
- xdel(num);
+ close(num);
end
endfunction