More samples in the graphic help pages Note that they are automatically generated...
[scilab.git] / scilab / modules / graphics / help / en_US / polygon / xpolys.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  * 
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" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="xpolys">
14   <info>
15     <pubdate>$LastChangedDate$</pubdate>
16   </info>
17   <refnamediv>
18     <refname>xpolys</refname>
19     <refpurpose> draw a set of polylines or polygons</refpurpose>
20   </refnamediv>
21   <refsynopsisdiv>
22     <title>Calling Sequence</title>
23     <synopsis>xpolys(xpols,ypols,[draw])</synopsis>
24   </refsynopsisdiv>
25   <refsection>
26     <title>Arguments</title>
27     <variablelist>
28       <varlistentry>
29         <term>xpols,ypols</term>
30         <listitem>
31           <para>matrices of the same size (p,n) (points of the polylines).</para>
32         </listitem>
33       </varlistentry>
34       <varlistentry>
35         <term>draw</term>
36         <listitem>
37           <para>vector of size n.</para>
38         </listitem>
39       </varlistentry>
40     </variablelist>
41   </refsection>
42   <refsection>
43     <title>Description</title>
44     <para>
45       <literal>xpolys</literal> draws a set of polylinse using marks or dashed lines. 
46       The coordinates of each polyline
47       are stored in a column of <literal>xpols</literal> and <literal>ypols</literal>.
48     </para>
49     <para>
50       The style of polyline i is given by <literal>draw(i)</literal>:
51     </para>
52     <itemizedlist>
53       <listitem>
54         <para>
55           If <literal>draw(i)</literal> is negative, the mark with id <literal>-draw(i)</literal> is used to draw polyline i (marks are drawn using the current pattern). Use <literal>xset()</literal> to see the meaning of the ids.
56         </para>
57       </listitem>
58       <listitem>
59         <para>
60           If <literal>draw(i)</literal> is strictly positive, the line style (or color) with id  <literal>draw(i)</literal> is used to draw polyline i. Use <literal>xset()</literal> to see the meaning of the ids.
61         </para>
62       </listitem>
63     </itemizedlist>
64   </refsection>
65   
66   <refsection>
67     <title>Sample</title>
68     <scilab:image>
69       plot2d(0,0,-1,"012"," ",[0,0,1,1])
70       rand("uniform")
71       xset("color",3)
72       xpolys(rand(3,5),rand(3,5),[-1,-2,0,1,2])
73     </scilab:image>
74   </refsection>
75   
76   <refsection>
77     <title>Examples</title>
78     <programlisting role="example"><![CDATA[ 
79 plot2d(0,0,-1,"012"," ",[0,0,1,1])
80 rand("uniform")
81 xset("color",3)
82 xpolys(rand(3,5),rand(3,5),[-1,-2,0,1,2])
83  ]]></programlisting>
84   </refsection>
85   <refsection role="see also">
86     <title>See Also</title>
87     <simplelist type="inline">
88       <member>
89         <link linkend="xfpoly">xfpoly</link>
90       </member>
91       <member>
92         <link linkend="xfpolys">xfpolys</link>
93       </member>
94       <member>
95         <link linkend="xpoly">xpoly</link>
96       </member>
97     </simplelist>
98   </refsection>
99 </refentry>