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