1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) INRIA - Serge Steer
5 * Copyright (C) 2016, 2018 - Samuel GOUGEON
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
11 * This file was originally licensed under the terms of the CeCILL v2.1,
12 * and continues to be available under such terms.
13 * For more information, see the COPYING file which you should have received
14 * along with this program.
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
18 xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
20 xml:lang="en" xml:id="isoview">
22 <refname>isoview</refname>
23 <refpurpose>tunes isometric rendering of graphical axes
31 isoview(idGraphics [,"on"|"off"])
32 isoview(xmin, xmax, ymin, ymax) // DEPRECATED. use replot()
35 <refsection role="arguments">
36 <title>Arguments</title>
39 <term>"on" | "off" | <none></term>
41 Enables or disables or switches the isometric rendering for all considered axes.
46 <term>idGraphics</term>
48 Vector of graphic handles. All the related axes are processed.
49 By default, the current axes is processed.
54 <term>xmin, xmax, ymin, ymax</term>
56 Four decimal numbers: new axes bounds.
57 <warning>These parameters will be removed from Scilab 6.1.
58 Please use <link linkend="replot">replot</link>
59 after <function>isoview</function> instead.
66 <refsection role="description">
67 <title>Description</title>
69 <function>isoview</function> is used to set or relax isometric rendering scales
70 on the x, y (and z) axes, without changing the size of the graphic window.
73 <literal>isoview()</literal> or simply <literal>isoview</literal>
74 toggles the isoview status of the current axes, and keeps its current
75 bounds: isometric scales are set whenever
76 they were free, or scales are relaxed whenever they were isometric.
79 <literal>isoview("on")</literal> or <literal>isoview on</literal>
80 sets isometric scales for the current axes.
83 <literal>isoview("off")</literal> or <literal>isoview off</literal>
84 relaxes x, y (and z) scales for the current axes.
87 <literal>isoview(idGraphics,..)</literal> runs on axes related
88 to each graphic object listed in the vector <varname>idGraphics</varname>:
91 If <varname>idGraphics(i)</varname> is a figure's handle,
92 all its Axes are considered.
95 If <varname>idGraphics(i)</varname> is an Axes,
96 it is considered as is.
99 If <varname>idGraphics(i)</varname> is the handle of a
100 sub-axes component (such as a polyline, a compound, etc),
101 its hosting axes is considered.
106 <literal>isoview(xmin, xmax, ymin, ymax)</literal> sets the current
107 axes in isometric mode, and then sets its bounds to the given values.
109 This usage is deprecated and will be removed from Scilab 6.1 onwards. Please use
110 <link linkend="replot">replot</link> after
111 <function>isoview</function> instead.
115 The current axes graphical entity is still the same after calling <literal>isoview(..)</literal>.
117 <note>To plot some curves directly in isometric mode without calling
118 <function>isoview</function> afterwards, the <literal>plot2d(...,frameflag=4)</literal>
119 option may be used at call time.
122 <title>Rendering according to .isoview and .cube_scaling settings</title>
124 <table align="middle">
126 <th>isoview(..)</th><th>gca().isoview</th>
127 <th>gca().cube_scaling</th>
128 <td><emphasis role="bold">Rendering</emphasis></td>
131 <th>on</th><td align="center">on</td>
132 <td align="center">off</td>
133 <td>X, Y and Z are isometric</td>
136 <th>off</th><td align="center">off</td>
137 <td align="center">on</td>
138 <td>independent X, Y and Z scales. In 3D, improved aspect ratios when X/Y/Z ranges are very different.</td>
141 <th></th><td align="center">off</td>
142 <td align="center">off</td>
143 <td>Independent X, Y, Z scales. In 3D, rendered X/Y/Z scales ratios are close to the data ones</td>
146 <th></th><td align="center">on</td>
147 <td align="center">on</td>
148 <td>Scales are such that the axes looks square or cubic</td>
154 <refsection role="examples">
155 <title>Examples</title>
156 <programlisting role="example"><![CDATA[
162 plot2d(cos(t),sin(t))
163 xtitle("True circle")
167 plot2d(cos(t),sin(t))
171 plot2d(7*cos(t),2*sin(t))
172 xtitle("True ellipse")
176 plot2d(7*cos(t),2*sin(t))
179 // plot of a sphere using facets computed by eval3dp
180 deff("[x,y,z] = sph(alp,tet)",[
181 "x = r*cos(alp).*cos(tet)+orig(1)*ones(tet)"; ..
182 "y = r*cos(alp).*sin(tet)+orig(2)*ones(tet)"; ..
183 "z = r*sin(alp)+orig(3)*ones(tet)"]);
184 r = 3; orig = [0 0 0];
185 [xx,yy,zz] = eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,40));
187 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
188 zlabel("isoview off", "rotation", -90, "fontsize",4)
189 xtitle("True sphere")
192 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
193 zlabel("isoview on", "rotation", -90, "fontsize",4)
196 // Switching isoview status for all axes
199 // Forcing isoview for all axes of the current figure
202 // Relaxing isoview for the current axes
205 // Setting isoview for top axes
207 isoview([a1 a2 a3], "on")
213 f.axes_size = [850 400];
216 plot2d(cos(t),sin(t))
217 xtitle("True circle")
220 plot2d(cos(t),sin(t))
224 plot2d(7*cos(t),2*sin(t))
225 xtitle("True ellipse")
228 plot2d(7*cos(t),2*sin(t))
231 // plot of a sphere using facets computed by eval3dp
232 deff("[x,y,z] = sph(alp,tet)",["x = r*cos(alp).*cos(tet)+orig(1)*ones(tet)"; ..
233 "y = r*cos(alp).*sin(tet)+orig(2)*ones(tet)"; ..
234 "z = r*sin(alp)+orig(3)*ones(tet)"]);
235 r = 3; orig = [0 0 0];
236 [xx,yy,zz] = eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,40));
238 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
239 zlabel("isoview off", "rotation", -90, "fontsize",4)
240 xtitle("True sphere")
243 plot3d(xx, yy, zz, alpha=60, flag=[color("green") 8 4])
244 zlabel("isoview on", "rotation", -90, "fontsize",4)
247 <programlisting role="example"><![CDATA[
248 // Using plot2d(..., frameflag=4) :
249 r = linspace(1,10,200);
253 plot2d(r.*sin(t),r.*cos(t))
257 plot2d(r.*sin(t),r.*cos(t),frameflag=4)
258 xtitle("with frameflag=4")
261 r = linspace(1,10,200);
265 plot2d(r.*sin(t),r.*cos(t))
269 plot2d(r.*sin(t),r.*cos(t),frameflag=4)
270 xtitle("with frameflag=4")
273 <refsection role="see also">
274 <title>See also</title>
275 <simplelist type="inline">
277 <link linkend="replot">replot</link>
280 <link linkend="axes_properties">Axes properties</link>
285 <refsection role="history">
286 <title>History</title>
289 <revnumber>6.0.0</revnumber>
292 <listitem>input flags "on"|"off" added.</listitem>
293 <listitem>input parameters <none> or idGraphics added.</listitem>
295 <literal>isoview(xmin, xmax, ymin, ymax)</literal> marked as deprecated.
301 <revnumber>6.0.2</revnumber>
303 "isoview on" now forces .cube_scaling="off", and
304 "isoview off" forces .cube_scaling="on".