cbf35a9e1cd64a96192e256f9467fe579525b158
[scilab.git] / scilab / modules / graphics / help / ru_RU / 2d_plot / LineSpec.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) INRIA - Fabrice Leray
5  *
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <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="LineSpec">
14     <refnamediv>
15         <refname>ВидЛинии</refname>
16         <refpurpose>
17             для быстрой настройки вида линий на графике
18         </refpurpose>
19     </refnamediv>
20     <refsection>
21         <title>Описание</title>
22         <para>
23             <literal>ВидЛинии</literal> - это необязательный аргумент,
24             который может быть использован внутри команды построения
25             графика <function>plot</function> для настройки вида каждой
26             новой линии. Он должен быть указан в виде соединённых строк,
27             содержащих информацию о цвете, стиле линий или маркеров.
28             Он очень полезен для быстрого определения этих основных свойств линий.
29         </para>
30         <para>
31             Чтобы определить красную штрихпунктирную линию с ромбовидными
32             маркерами, строка должна быть в виде <literal>'r-.diam'</literal>.
33             Как вы можете видеть, полное написание значения каждого свойства не
34             обязательно, однако строка, которая является связкой 
35             (в любом порядке) этих трёх типов свойств, должна оставаться
36             однозначной. Кроме того, определение строки не чувствительно
37             к регистру.
38         </para>
39         <para>
40             Вот полный список типов <literal>ВидЛинии</literal>, которые
41             вы можете определить (используя <link linkend="plot">plot</link>).
42         </para>
43         <variablelist>
44             <varlistentry>
45                 <term>Стиль линии: </term>
46                 <listitem>
47                     <para>
48                         строка, определяющая стиль линии. Это свойство связано
49                         со свойством объекта <literal>line_style</literal> ("стиль линии") 
50                         (см. <link linkend="polyline_properties">свойства ломанной линии</link>).
51                     </para>
52                     <para/>
53                     <informaltable border="1">
54                         <tr>
55                             <td>
56                                 <literal>Определитель</literal>
57                             </td>
58                             <td>
59                                 <literal>Стиль линии</literal>
60                             </td>
61                         </tr>
62                         <tr>
63                             <td>
64                                 <literal>-</literal>
65                             </td>
66                             <td>Сплошная линия (по умолчанию)</td>
67                         </tr>
68                         <tr>
69                             <td>
70                                 <literal>--</literal>
71                             </td>
72                             <td>Штриховая линия</td>
73                         </tr>
74                         <tr>
75                             <td>
76                                 <literal>:</literal>
77                             </td>
78                             <td>Пунктирная линия</td>
79                         </tr>
80                         <tr>
81                             <td>
82                                 <literal>-.</literal>
83                             </td>
84                             <td>Штрихпунктирная линия</td>
85                         </tr>
86                     </informaltable>
87                 </listitem>
88             </varlistentry>
89             <varlistentry>
90                 <term>Цвет: </term>
91                 <listitem>
92                     <para>
93                         строка, определяющая цвет линии. Это свойство связано со
94                         свойством объекта <literal>foreground</literal> ("передний
95                         фон")(см.
96                         <link linkend="polyline_properties">свойства ломаной линии</link>).
97                     </para>
98                     <para/>
99                     <informaltable border="1">
100                         <tr>
101                             <td>
102                                 <literal>Определитель</literal>
103                             </td>
104                             <td>
105                                 <literal>Цвет</literal>
106                             </td>
107                         </tr>
108                         <tr>
109                             <td>
110                                 <literal>r</literal>
111                             </td>
112                             <td>Красный</td>
113                         </tr>
114                         <tr>
115                             <td>
116                                 <literal>g</literal>
117                             </td>
118                             <td>Зелёный</td>
119                         </tr>
120                         <tr>
121                             <td>
122                                 <literal>b</literal>
123                             </td>
124                             <td>Синий</td>
125                         </tr>
126                         <tr>
127                             <td>
128                                 <literal>c</literal>
129                             </td>
130                             <td>Голубой</td>
131                         </tr>
132                         <tr>
133                             <td>
134                                 <literal>m</literal>
135                             </td>
136                             <td>Пурпурный</td>
137                         </tr>
138                         <tr>
139                             <td>
140                                 <literal>y</literal>
141                             </td>
142                             <td>Жёлтый</td>
143                         </tr>
144                         <tr>
145                             <td>
146                                 <literal>k</literal>
147                             </td>
148                             <td>Чёрный</td>
149                         </tr>
150                         <tr>
151                             <td>
152                                 <literal>w</literal>
153                             </td>
154                             <td>Белый</td>
155                         </tr>
156                     </informaltable>
157                 </listitem>
158             </varlistentry>
159             <varlistentry>
160                 <term/>
161                 <listitem>
162                     <para>
163                         Если вы не укажете цвет (ни с помощью <literal>ВидЛинии</literal>,
164                         ни с помощью <link linkend="GlobalProperty">ГлобальноеСвойство</link>),
165                         то будет использоваться таблица цветов, устанавливаемых по умолчанию.
166                         Во время рисования множества линий, команда <function>plot</function>
167                         автоматически перебирает в цикле эту таблицу. Вот используемые цвета:
168                     </para>
169                     <para/>
170                 </listitem>
171             </varlistentry>
172             <varlistentry>
173                 <term/>
174                 <listitem>
175                     <informaltable border="1">
176                         <tr>
177                             <td>
178                                 <literal>R</literal>
179                             </td>
180                             <td>
181                                 <literal>G</literal>
182                             </td>
183                             <td>
184                                 <literal>B</literal>
185                             </td>
186                         </tr>
187                         <tr>
188                             <td>0.</td>
189                             <td>0.</td>
190                             <td>1.</td>
191                         </tr>
192                         <tr>
193                             <td>0.</td>
194                             <td>0.5</td>
195                             <td>0.</td>
196                         </tr>
197                         <tr>
198                             <td>1.</td>
199                             <td>0.</td>
200                             <td>0.</td>
201                         </tr>
202                         <tr>
203                             <td>0.</td>
204                             <td>0.75</td>
205                             <td>0.75</td>
206                         </tr>
207                         <tr>
208                             <td>0.75</td>
209                             <td>0.</td>
210                             <td>0.75</td>
211                         </tr>
212                         <tr>
213                             <td>0.75</td>
214                             <td>0.75</td>
215                             <td>0.</td>
216                         </tr>
217                         <tr>
218                             <td>0.25</td>
219                             <td>0.25</td>
220                             <td>0.25</td>
221                         </tr>
222                     </informaltable>
223                 </listitem>
224             </varlistentry>
225             <varlistentry>
226                 <term>Тип маркера: </term>
227                 <listitem>
228                     <para>
229                         Строка, определяющая тип маркера. Заметьте, что, если вы укажете
230                         маркер без стиля линии, то будут нарисованы только маркеры.
231                         Это свойство связано со свойствами объекта <literal>mark_style</literal>
232                         ("стиль маркера") и <literal>mark_mode</literal> ("режим маркера")
233                         (см. <link linkend="polyline_properties">свойства ломаной линии</link>).
234                     </para>
235                     <para/>
236                     <informaltable border="1">
237                         <tr>
238                             <td>
239                                 <literal>Определитель</literal>
240                             </td>
241                             <td>
242                                 <literal>Тип маркера</literal>
243                             </td>
244                         </tr>
245                         <tr>
246                             <td>
247                                 <literal>+</literal>
248                             </td>
249                             <td>Знак "плюс"</td>
250                         </tr>
251                         <tr>
252                             <td>
253                                 <literal>o</literal>
254                             </td>
255                             <td>Кружок</td>
256                         </tr>
257                         <tr>
258                             <td>
259                                 <literal>*</literal>
260                             </td>
261                             <td>Звёздочка</td>
262                         </tr>
263                         <tr>
264                             <td>
265                                 <literal>.</literal>
266                             </td>
267                             <td>Точка</td>
268                         </tr>
269                         <tr>
270                             <td>
271                                 <literal>x</literal>
272                             </td>
273                             <td>Крестик</td>
274                         </tr>
275                         <tr>
276                             <td>
277                                 <literal>'square'</literal> или
278                                 <literal>'s'</literal>
279                             </td>
280                             <td>Квадрат</td>
281                         </tr>
282                         <tr>
283                             <td>
284                                 <literal>'diamond'</literal> или
285                                 <literal>'d'</literal>
286                             </td>
287                             <td>Ромб</td>
288                         </tr>
289                         <tr>
290                             <td>
291                                 <literal>^</literal>
292                             </td>
293                             <td>Треугольник, указывающий вверх</td>
294                         </tr>
295                         <tr>
296                             <td>
297                                 <literal>v</literal>
298                             </td>
299                             <td>Треугольник, указывающий вниз</td>
300                         </tr>
301                         <tr>
302                             <td>
303                                 <literal>&gt;</literal>
304                             </td>
305                             <td>Треугольник, указывающий вправо</td>
306                         </tr>
307                         <tr>
308                             <td>
309                                 <literal>&lt;</literal>
310                             </td>
311                             <td>Треугольник, указывающий влево</td>
312                         </tr>
313                         <tr>
314                             <td>
315                                 <literal>'pentagram' или 'p'</literal>
316                             </td>
317                             <td>Пятиконечная звезда (пентаграмма)</td>
318                         </tr>
319                         <tr>
320                             <td>                                
321                             </td>
322                             <td>Нет маркера (по умолчанию)</td>
323                         </tr>
324                     </informaltable>
325                 </listitem>
326             </varlistentry>
327         </variablelist>
328     </refsection>
329     <refsection>
330         <title>Примеры</title>
331         <programlisting role="example"><![CDATA[
332 clf();
333 x=1:0.1:10; // Инициализация.
334 plot(x,sin(x),'r-.>') // строит штрихпунктирную линию с треугольниками, указывающими вправо, центрованными на каждой точке
335  ]]></programlisting>
336         <scilab:image>
337             x=1:0.1:10;
338             plot(x,sin(x),'r.->')
339         </scilab:image>
340         <programlisting role="example"><![CDATA[
341 clf();
342 x=1:0.1:10;
343 // Если вы укажете маркер без стиля линии, то только маркеры будут нарисованы
344 plot(x,sin(x),'d') 
345  ]]></programlisting>
346         <scilab:image>
347             x=1:0.1:10;
348             plot(x,sin(x),'d')
349         </scilab:image>
350         <programlisting role="example"><![CDATA[
351 clf();
352 x = 1:0.5:10; // Init.
353 // Порядок информации о цвете, стили линии или маркерах не имеет значения
354 // ОДНАКО информация должна быть однозначной
355 subplot(311);plot(x,sin(x),'.b-');
356 subplot(312);plot(x,sin(x),'b.-');
357 subplot(313);plot(x,sin(x),'b-.');// Точка принадлежит информации о стиле линии (не маркера!)
358  ]]></programlisting>
359         <scilab:image>
360             x = 1:0.5:10;
361             subplot(311);plot(x,sin(x),'.b-');
362             subplot(312);plot(x,sin(x),'b.-');
363             subplot(313);plot(x,sin(x),'b-.');
364         </scilab:image>
365         <programlisting role="example"><![CDATA[
366 //множество графиков с различными видами линии
367 clf();
368 t=0:%pi/20:2*%pi;
369 plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
370  ]]></programlisting>
371         <scilab:image>
372             t=0:%pi/20:2*%pi;
373             plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
374         </scilab:image>
375     </refsection>
376     <refsection role="see also">
377         <title>Смотрите также</title>
378         <simplelist type="inline">
379             <member>
380                 <link linkend="color">color</link>
381             </member>
382             <member>
383                 <link linkend="GlobalProperty">ГлобальноеСвойство</link>
384             </member>
385             <member>
386                 <link linkend="plot">plot</link>
387             </member>
388             <member>
389                 <link linkend="clf">clf</link>
390             </member>
391         </simplelist>
392     </refsection>
393 </refentry>