[doc] champ() page fixed + improved after f94449
[scilab.git] / scilab / modules / graphics / help / ja_JP / 2d_plot / champ.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) ENPC - Jean-Philippe Chancelier
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  * Copyright (C) 2020 - Samuel GOUGEON
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19           xml:lang="ja" xml:id="champ">
20     <refnamediv>
21         <refname>champ</refname>
22         <refpurpose>2次元ベクトルフィールドのプロット</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>呼び出し手順</title>
26         <synopsis>
27             champ()  // example
28             champ(x, y, fx, fy)
29             champ(x, y, fx, fy, arfact)
30             champ(x, y, fx, fy, arfact, rect)
31             champ(x, y, fx, fy, arfact, rect, strf)
32             champ(x, y, fx, fy, &lt;opt_args&gt;)
33         </synopsis>
34     </refsynopsisdiv>
35     <refsection>
36         <title>引数</title>
37         <variablelist>
38             <varlistentry>
39                 <term>x,y</term>
40                 <listitem>
41                     <para>
42                         vectors of decimal numbers, which define the grid of nodes
43                         = coordinates of arrows starting points.
44                     </para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>fx</term>
49                 <listitem>
50                     <para>ベクトルフィールドのx要素を記述する行列.
51                         <literal>fx(i,j)</literal> は点<literal>(x(i),y(j))</literal>における
52                         ベクトルフィールドのx要素です.
53                     </para>
54                 </listitem>
55             </varlistentry>
56             <varlistentry>
57                 <term>fy</term>
58                 <listitem>
59                     <para>ベクトルフィールドのy要素を記述する行列.
60                         <literal>fy(i,j)</literal> は点<literal>(x(i),y(j))</literal>における
61                         ベクトルフィールドのy要素です.
62                     </para>
63                 </listitem>
64             </varlistentry>
65             <varlistentry>
66                 <term>&lt;opt_args&gt;</term>
67                 <listitem>
68                     <para>一連の命令
69                         <literal>key1=value1,key2=value2</literal>,... を表します.
70                         ただし, <literal>key1</literal>,
71                         <literal>key2,...</literal> には以下のどれかを指定可能です: arfact, rect,
72                         strf (以下参照).
73                     </para>
74                 </listitem>
75             </varlistentry>
76             <varlistentry>
77                 <term>arfact</term>
78                 <listitem>
79                     <para>
80                         実数型のオプションの引数で,
81                         プロット時の矢じりの表示用のスケールファクタを指定します.
82                         (デフォルト値は 1.0).
83                     </para>
84                 </listitem>
85             </varlistentry>
86             <varlistentry>
87                 <term>rect</term>
88                 <listitem>
89                     <para>使用するグラフィックフレームの境界を指定する
90                         ベクトル<literal>rect=[xmin,ymin,xmax,ymax]</literal>.
91                     </para>
92                 </listitem>
93             </varlistentry>
94             <varlistentry>
95                 <term>strf</term>
96                 <listitem>
97                     <para>
98                         長さ3の文字列 "xyz" で,<literal>plot2d</literal>の
99                         <literal>strf</literal>パラメータと意味は同じです.
100                         最初の文字xは<literal>champ</literal>では意味がありません.
101                     </para>
102                 </listitem>
103             </varlistentry>
104         </variablelist>
105     </refsection>
106     <refsection>
107         <title>説明</title>
108         <para>
109             <literal>champ(…)</literal> plots a field of 2D vectors with arrows.
110         </para>
111         <para>
112             By default, all arrows have the same color, and their length is
113             proportional to the local intensity of the field (norm of vectors).
114             In addition, all lengths are normalized according to the longest arrow.
115         </para>
116         <para>
117             When setting <literal>gce().colored = "on"</literal>,
118             each arrow becomes as long as possible in its cell, and is colored
119             according to the local intensity of the field.
120         </para>
121         <para>
122             After calling <literal>champ(…)</literal>, <literal>gce()</literal>
123             returns the handle of the field of arrows, of type <literal>Champ</literal>,
124             whose <link linkend="champ_properties">properties</link> can be post-processed.
125         </para>
126         <para>
127             コマンド <literal>champ()</literal> を入力するとデモが表示されます.
128         </para>
129     </refsection>
130     <refsection>
131         <title>例</title>
132         <programlisting role="example"><![CDATA[
133 x = -4:6;
134 X = ndgrid(x);
135 [fx, fy] =  (rand(X)-0.5, rand(X)-0.5);
136
137 clf
138 gcf().color_map = jetcolormap(50);
139
140 // Field's intensity = arrows length
141 subplot(2,2,1)
142 champ(x, x, fx, fy)
143
144 // With bigger arrow heads
145 subplot(2,2,2)
146 champ(x, x, fx, fy, arfact=1.7)
147 title("arfact=1.7", "fontsize",3)
148
149 // Field's intensity = arrows color
150 xsetech([0 0.5 0.55 0.5])
151 champ(x, x, fx, fy, arfact=1.7)
152 gce().colored = "on";
153 title("arfact=1.7, .colored=""on""", "fontsize",3)
154 L = sqrt(fx.^2 + fy.^2);
155 colorbar(min(L), max(L));
156
157 // Field's intensity = color, + imposed boundaries
158 subplot(2,2,4)
159 champ(x, x, fx, fy, rect=[-5,-6,9,7],strf="011")
160 gce().colored = "on";
161 title("rect=[-5,-6,9,6], strf=""011"", .colored=""on""", "fontsize",3)
162
163 gcf().axes_size = [740 680];
164     ]]></programlisting>
165         <scilab:image>
166             x = -4:6;
167             X = ndgrid(x);
168             [fx, fy] =  (rand(X)-0.5, rand(X)-0.5);
169
170             clf
171             gcf().color_map = jetcolormap(50);
172
173             // Field's intensity = arrows length
174             subplot(2,2,1)
175             champ(x, x, fx, fy)
176
177             // With bigger arrow heads
178             subplot(2,2,2)
179             champ(x, x, fx, fy, arfact=1.7)
180             title("arfact=1.7", "fontsize",3)
181
182             // Field's intensity = arrows color
183             xsetech([0 0.5 0.55 0.5])
184             champ(x, x, fx, fy, arfact=1.7)
185             gce().colored = "on";
186             title("arfact=1.7, .colored=""on""", "fontsize",3)
187             L = sqrt(fx.^2 + fy.^2);
188             colorbar(min(L), max(L));
189
190             // Field's intensity = color, + imposed boundaries
191             subplot(2,2,4)
192             champ(x, x, fx, fy, rect=[-5,-6,9,7],strf="011")
193             gce().colored = "on";
194             title("rect=[-5,-6,9,6], strf=""011"", .colored=""on""", "fontsize",3)
195
196             gcf().axes_size = [740 680];
197         </scilab:image>
198         <programlisting role="example"><![CDATA[
199 x = -1.2:0.11:0.7;
200 y = -1:0.11:0.5;
201 [X, Y] = ndgrid(x, y);
202 [fx, fy] = (2*X, 2*Y);
203
204 clf
205 xsetech([0 0 0.45 1])
206 champ(x, y, fx, fy)
207 title(".colored = ""off"" (default)", "fontsize",3)
208 xsetech([0.45 0 0.55 1])
209 champ(x, y, fx, fy)
210 title(".colored = ""on""", "fontsize",3)
211 gce().colored = "on";
212
213 gcf().color_map = jetcolormap(100);
214 L = sqrt(fx.^2 + fy.^2);
215 colorbar(min(L), max(L));
216 ]]></programlisting>
217         <scilab:image>
218             x = -1.2:0.11:0.7;
219             y = -1:0.11:0.5;
220             [X, Y] = ndgrid(x, y);
221             [fx, fy] = (2*X, 2*Y);
222
223             clf
224             xsetech([0 0 0.45 1])
225             champ(x, y, fx, fy)
226             title(".colored = ""off"" (default)", "fontsize",3)
227             xsetech([0.45 0 0.55 1])
228             champ(x, y, fx, fy)
229             title(".colored = ""on""", "fontsize",3)
230             gce().colored = "on";
231
232             gcf().color_map = jetcolormap(100);
233             L = sqrt(fx.^2 + fy.^2);
234             colorbar(min(L), max(L));
235
236             gcf().axes_size = [720 340];
237         </scilab:image>
238     </refsection>
239     <refsection role="see also">
240         <title>参照</title>
241         <simplelist type="inline">
242             <member>
243                 <link linkend="champ_properties">champ_properties</link>
244             </member>
245             <member>
246                 <link linkend="fchamp">fchamp</link>
247             </member>
248             <member>
249                 <link linkend="xarrows">xarrows</link>
250             </member>
251             <member>
252                 <link linkend="polyline_properties">Arrowed polyline</link>
253             </member>
254         </simplelist>
255     </refsection>
256 </refentry>