More samples in the graphic help pages Note that they are automatically generated...
[scilab.git] / scilab / modules / graphics / help / en_US / 2d_plot / graypolarplot.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
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="graypolarplot">
14   <info>
15     <pubdate>$LastChangedDate$</pubdate>
16   </info>
17   <refnamediv>
18     <refname>graypolarplot</refname>
19     <refpurpose>Polar 2D plot of a surface using
20       colors
21     </refpurpose>
22   </refnamediv>
23   <refsynopsisdiv>
24     <title>Calling Sequence</title>
25     <synopsis>graypolarplot(theta,rho,z,[strf,rect])</synopsis>
26   </refsynopsisdiv>
27   <refsection>
28     <title>Arguments</title>
29     <variablelist>
30       <varlistentry>
31         <term>theta</term>
32         <listitem>
33           <para>a vector with size n1, the discretization of the the
34             angle in radian.
35           </para>
36         </listitem>
37       </varlistentry>
38       <varlistentry>
39         <term>rho</term>
40         <listitem>
41           <para>a vector with size n2, the discretization of the radius</para>
42         </listitem>
43       </varlistentry>
44       <varlistentry>
45         <term>z</term>
46         <listitem>
47           <para>
48             real matrix of size (n1,n2). <literal>z(i,j)</literal> is the value
49             of the surface at the point (theta(i),rho(j)).
50           </para>
51         </listitem>
52       </varlistentry>
53       <varlistentry>
54         <term>strf</term>
55         <listitem>
56           <para>
57             is a string of length 3 <literal>"xy0"</literal>.
58           </para>
59           <variablelist>
60             <varlistentry>
61               <term>default</term>
62               <listitem>
63                 <para>
64                   The default is <literal>"030"</literal>.
65                 </para>
66               </listitem>
67             </varlistentry>
68             <varlistentry>
69               <term>x</term>
70               <listitem>
71                 <para>controls the display of captions.</para>
72                 <variablelist>
73                   <varlistentry>
74                     <term>x=0</term>
75                     <listitem>
76                       <para>no captions.</para>
77                     </listitem>
78                   </varlistentry>
79                   <varlistentry>
80                     <term>x=1</term>
81                     <listitem>
82                       <para>captions are displayed. They are given by the
83                         optional argument <literal>leg</literal>.
84                       </para>
85                     </listitem>
86                   </varlistentry>
87                 </variablelist>
88               </listitem>
89             </varlistentry>
90             <varlistentry>
91               <term>y</term>
92               <listitem>
93                 <para>controls the computation of the frame.</para>
94                 <variablelist>
95                   <varlistentry>
96                     <term>y=0</term>
97                     <listitem>
98                       <para>the current boundaries (set by a previous call to
99                         another high level plotting function) are used. Useful
100                         when superposing multiple plots.
101                       </para>
102                     </listitem>
103                   </varlistentry>
104                   <varlistentry>
105                     <term>y=1</term>
106                     <listitem>
107                       <para>
108                         the optional argument <literal>rect</literal> is used to
109                         specify the boundaries of the plot.
110                       </para>
111                     </listitem>
112                   </varlistentry>
113                   <varlistentry>
114                     <term>y=2</term>
115                     <listitem>
116                       <para>the boundaries of the plot are computed using min
117                         and max values of <literal>x</literal> and
118                         <literal>y</literal>.
119                       </para>
120                     </listitem>
121                   </varlistentry>
122                   <varlistentry>
123                     <term>y=3</term>
124                     <listitem>
125                       <para>
126                         like <literal>y=1</literal> but produces isoview
127                         scaling.
128                       </para>
129                     </listitem>
130                   </varlistentry>
131                   <varlistentry>
132                     <term>y=4</term>
133                     <listitem>
134                       <para>
135                         like <literal>y=2</literal> but produces isoview
136                         scaling.
137                       </para>
138                     </listitem>
139                   </varlistentry>
140                   <varlistentry>
141                     <term>y=5</term>
142                     <listitem>
143                       <para>
144                         like <literal>y=1</literal> but <literal>plot2d</literal> can
145                         change the boundaries of the plot and the ticks of the
146                         axes to produce pretty graduations. When the zoom button
147                         is activated, this mode is used.
148                       </para>
149                     </listitem>
150                   </varlistentry>
151                   <varlistentry>
152                     <term>y=6</term>
153                     <listitem>
154                       <para>
155                         like <literal>y=2</literal> but <literal>plot2d</literal> can
156                         change the boundaries of the plot and the ticks of the
157                         axes to produce pretty graduations. When the zoom button
158                         is activated, this mode is used.
159                       </para>
160                     </listitem>
161                   </varlistentry>
162                   <varlistentry>
163                     <term>y=7</term>
164                     <listitem>
165                       <para>
166                         like <literal>y=5</literal> but the scale of the new
167                         plot is merged with the current scale.
168                       </para>
169                     </listitem>
170                   </varlistentry>
171                   <varlistentry>
172                     <term>y=8</term>
173                     <listitem>
174                       <para>
175                         like <literal>y=6</literal> but the scale of the new
176                         plot is merged with the current scale.
177                       </para>
178                     </listitem>
179                   </varlistentry>
180                 </variablelist>
181               </listitem>
182             </varlistentry>
183           </variablelist>
184         </listitem>
185       </varlistentry>
186       <varlistentry>
187         <term>leg</term>
188         <listitem>
189           <para>a string. It is used when the first character x of argument
190             <literal>strf</literal> is 1. <literal>leg</literal> has the form
191             <literal>"leg1@leg2@...."</literal> where <literal>leg1</literal>,
192             <literal>leg2</literal>, etc. are respectively the captions of the first
193             curve, of the second curve, etc. The default is <literal>""</literal>.
194           </para>
195         </listitem>
196       </varlistentry>
197       <varlistentry>
198         <term>rect</term>
199         <listitem>
200           <para>This argument is used when the second character y of argument
201             <literal>strf</literal> is 1, 3 or 5. It is a row vector of size 4 and
202             gives the dimension of the frame:
203             <literal>rect=[xmin,ymin,xmax,ymax]</literal>.
204           </para>
205         </listitem>
206       </varlistentry>
207     </variablelist>
208   </refsection>
209   <refsection>
210     <title>Description</title>
211     <para>
212       Takes a 2D plot of the surface given by <literal>z</literal> on a polar
213       coordinate grid defined by <literal>rho</literal> and <literal>theta</literal>. Each
214       grid region if filled with a gray or color level depending on the average
215       value of <literal>z</literal> on the corners of the grid.
216     </para>
217   </refsection>
218   <refsection>
219     <title>Examples</title>
220     <programlisting role="example"><![CDATA[ 
221 rho=1:0.1:4;theta=(0:0.02:1)*2*%pi;
222 z=30+round(theta'*(1+rho^2));
223 f=gcf();
224 f.color_map= hotcolormap(128);
225 clf();graypolarplot(theta,rho,z)
226  ]]></programlisting>
227   </refsection>
228 </refentry>