6d9eeea14d09e1d71df50ce79d032f9504fb9532
[scilab.git] / scilab / modules / graphics / help / en_US / axes_operations / isoview.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 - Serge Steer
5  * Copyright (C) 2016 - Samuel GOUGEON
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
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" 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="en" xml:id="isoview">
17     <refnamediv>
18         <refname>isoview</refname>
19         <refpurpose>tunes isometric rendering of graphical axes
20         </refpurpose>
21     </refnamediv>
22     <refsynopsisdiv>
23         <title>Syntax</title>
24         <synopsis>isoview
25             isoview on
26             isoview off
27             isoview(idGraphics [,"on"|"off"])
28             isoview(xmin, xmax, ymin, ymax)    // DEPRECATED. use replot()
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection role="arguments">
32         <title>Arguments</title>
33         <variablelist>
34             <varlistentry>
35                 <term>"on" | "off" | &lt;none&gt;</term>
36                 <listitem>Enables or disables or switches the isometric rendering for all considered axes.
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>idGraphics</term>
41                 <listitem>
42                     Vector of graphic handles. All the related axes are processed.
43                     By default, the current axes is processed.
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>xmin, xmax, ymin, ymax</term>
48                 <listitem>
49                     Four decimal numbers: new axes bounds.
50                     <warning>These parameters will be removed from Scilab 6.1.
51                         Please used <link linkend="replot">replot</link>
52                         after <function>isoview</function> instead.
53                     </warning>
54                 </listitem>
55             </varlistentry>
56         </variablelist>
57     </refsection>
58     <refsection role="description">
59         <title>Description</title>
60         <para>
61             <function>isoview</function> is used to set or relax isometric rendering scales
62             on the x, y (and z) axes, without changing the size of the graphic window.
63         </para>
64         <para>
65             <literal>isoview()</literal> or simply <literal>isoview</literal>
66             toggles the isoview status of the current axes, and keeps its current
67             bounds: isometric scales are set whenever
68             they were free, or scales are relaxed whenever they were isometric.
69         </para>
70         <para>
71             <literal>isoview("on")</literal> or <literal>isoview on</literal>
72             sets isometric scales for the current axes.
73         </para>
74         <para>
75             <literal>isoview("off")</literal> or <literal>isoview off</literal>
76             relaxes x, y (and z)  scales for the current axes.
77         </para>
78         <para>
79             <literal>isoview(idGraphics,..)</literal> runs on axes related
80             to each graphic object listed in the vector <varname>idGraphics</varname>:
81             <itemizedlist>
82                 <listitem>
83                     If <varname>idGraphics(i)</varname> is a figure's handle,
84                     all its Axes are considered.
85                 </listitem>
86                 <listitem>
87                     If <varname>idGraphics(i)</varname> is an Axes,
88                     it is considered as is.
89                 </listitem>
90                 <listitem>
91                     If <varname>idGraphics(i)</varname> is the handle of a
92                     sub-axes component(such as a polyline, a compound, etc),
93                     its hosting axes is considered.
94                 </listitem>
95             </itemizedlist>
96         </para>
97         <para>
98             <literal>isoview(xmin, xmax, ymin, ymax)</literal> sets the current
99             axes in isometric mode, and then sets its bounds to the given values.
100             <warning>
101                 This usage is deprecated and will be removed from Scilab 6.1 onwards. Please use
102                 <link linkend="replot">replot</link> after
103                 <function>isoview</function> instead.
104             </warning>
105         </para>
106         <note>
107             The current axes graphical entity is still the same after calling <literal>isoview(..)</literal>.
108         </note>
109         <note>To plot some curves directly in isometric mode without calling
110             <function>isoview</function> afterwards, the <literal>plot2d(...,frameflag=4)</literal>
111             option may be used at call time.
112         </note>
113     </refsection>
114     <refsection role="examples">
115         <title>Examples</title>
116         <programlisting role="example"><![CDATA[
117 t = [0:0.1:2*%pi]';
118 clf
119 nc = 3;
120
121 subplot(2,nc,1)
122 plot2d(cos(t),sin(t))
123 xtitle("True circle")
124 a1 = gca();
125
126 subplot(2,nc,nc+1)
127 plot2d(cos(t),sin(t))
128 isoview
129
130 subplot(2,nc,2)
131 plot2d(7*cos(t),2*sin(t))
132 xtitle("True ellipse")
133 a2 = gca();
134
135 subplot(2,nc,nc+2)
136 plot2d(7*cos(t),2*sin(t))
137 isoview
138
139 // plot of a sphere using facets computed by eval3dp
140 deff("[x,y,z] = sph(alp,tet)",[
141     "x = r*cos(alp).*cos(tet)+orig(1)*ones(tet)"; ..
142     "y = r*cos(alp).*sin(tet)+orig(2)*ones(tet)"; ..
143     "z = r*sin(alp)+orig(3)*ones(tet)"]);
144 r = 3; orig = [0 0 0];
145 [xx,yy,zz] = eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,40));
146 subplot(2,nc,3)
147 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
148 xtitle("True sphere")
149 a3 = gca();
150 subplot(2,nc,nc+3)
151 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
152 isoview
153
154 // Switching isoview status for all axes
155 isoview(gcf())
156
157 // Forcing isoview for all axes of the current figure
158 isoview(gcf(), "on")
159
160 // Relaxing isoview for the current axes
161 isoview off
162
163 // Setting isoview for top axes
164 isoview(gcf(),"off")
165 isoview([a1 a2 a3], "on")
166              ]]></programlisting>
167         <scilab:image>
168             t = [0:0.1:2*%pi]';
169             clf
170             f = gcf();
171             f.axes_size = [850 400];
172             nc = 3;
173             subplot(2,nc,1)
174             plot2d(cos(t),sin(t))
175             xtitle("True circle")
176             a1 = gca();
177             subplot(2,nc,nc+1)
178             plot2d(cos(t),sin(t))
179             isoview
180
181             subplot(2,nc,2)
182             plot2d(7*cos(t),2*sin(t))
183             xtitle("True ellipse")
184             a2 = gca();
185             subplot(2,nc,nc+2)
186             plot2d(7*cos(t),2*sin(t))
187             isoview
188
189             // plot of a sphere using facets computed by eval3dp
190             deff("[x,y,z] = sph(alp,tet)",["x = r*cos(alp).*cos(tet)+orig(1)*ones(tet)"; ..
191             "y = r*cos(alp).*sin(tet)+orig(2)*ones(tet)"; ..
192             "z = r*sin(alp)+orig(3)*ones(tet)"]);
193             r = 3; orig = [0 0 0];
194             [xx,yy,zz] = eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,40));
195             subplot(2,nc,3)
196             plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
197             xtitle("True sphere")
198             a3 = gca();
199             subplot(2,nc,nc+3)
200             plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
201             isoview
202         </scilab:image>
203         <programlisting role="example"><![CDATA[
204 // Using plot2d(..., frameflag=4) :
205 r = linspace(1,10,200);
206 t = r*3;
207 scf();
208 subplot(1,2,1)
209 plot2d(r.*sin(t),r.*cos(t))
210 xtitle("plot2d(..)")
211
212 subplot(1,2,2)
213 plot2d(r.*sin(t),r.*cos(t),frameflag=4)
214 xtitle("with frameflag=4")
215              ]]></programlisting>
216         <scilab:image>
217             r = linspace(1,10,200);
218             t = r*3;
219             scf();
220             subplot(1,2,1)
221             plot2d(r.*sin(t),r.*cos(t))
222             xtitle("plot2d(..)")
223
224             subplot(1,2,2)
225             plot2d(r.*sin(t),r.*cos(t),frameflag=4)
226             xtitle("with frameflag=4")
227         </scilab:image>
228     </refsection>
229     <refsection role="see also">
230         <title>See also</title>
231         <simplelist type="inline">
232             <member>
233                 <link linkend="replot">replot</link>
234             </member>
235             <member>
236                 <link linkend="axes_properties">Axes properties</link>
237             </member>
238         </simplelist>
239     </refsection>
240
241     <refsection role="history">
242         <title>History</title>
243         <revhistory>
244             <revision>
245                 <revnumber>6.0</revnumber>
246                 <revdescription>
247                     <itemizedlist>
248                         <listitem>input flags "on"|"off" added.</listitem>
249                         <listitem>input parameters &lt;none&gt; or idGraphics added.</listitem>
250                         <listitem>
251                             <literal>isoview(xmin, xmax, ymin, ymax)</literal> marked as deprecated.
252                         </listitem>
253                     </itemizedlist>
254                 </revdescription>
255             </revision>
256         </revhistory>
257     </refsection>
258 </refentry>