scatter with extended polyline properties mark_size, mark_foreground, mark_background
[scilab.git] / scilab / modules / graphics / help / en_US / xsetech.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.1-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" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="xsetech">
14     <refnamediv>
15         <refname>xsetech</refname>
16         <refpurpose>
17             set the sub-window of a graphics window for plotting
18         </refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Calling Sequence</title>
22         <synopsis>
23             xsetech(wrect, [frect, logflag])
24             xsetech(wrect=[...], frect=[..], logflag="..", arect=[...])
25             xsetech()
26         </synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Arguments</title>
30         <variablelist>
31             <varlistentry>
32                 <term>wrect</term>
33                 <listitem>
34                     <para>
35                         a vector of size 4, defining the sub-window to use.
36                     </para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>frect</term>
41                 <listitem>
42                     <para>
43                         a vector of size 4.
44                     </para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>logflag</term>
49                 <listitem>
50                     <para>
51                         a string of size 2 <literal>"xy"</literal>, where
52                         <literal>x</literal> and <literal>y</literal> can be
53                         <literal>"n"</literal> or <literal>"l"</literal>.
54                         <literal>"n"</literal> stands for  normal and "l" stands
55                         for logscale. <literal>x</literal> stands for the x-axis
56                         and <literal>y</literal> stands for the y-axis.
57                     </para>
58                 </listitem>
59             </varlistentry>
60             <varlistentry>
61                 <term>arect</term>
62                 <listitem>
63                     <para>a vector of size 4.</para>
64                 </listitem>
65             </varlistentry>
66         </variablelist>
67     </refsection>
68     <refsection>
69         <title>Description</title>
70         <para>
71             <function>xsetech</function> is mainly used to set the sub-window of
72             the graphics window which will be used for plotting. The sub-window
73             is specified with the parameter <literal>wrect=[x,y,w,h]</literal>
74             (upper-left point, width, height). The values in
75             <varname>wrect</varname> are specified using proportion of
76             the width or height of the current graphic window. For instance
77             <literal>wrect=[0, 0, 1, 1]</literal> means that the whole graphics
78             window will be used, and <literal>wrect=[0.5, 0, 0.5, 1]</literal>
79             means that the graphics region will be the right half of the
80             graphics window.
81         </para>
82         <para>
83             <function>xsetech</function> also set the current graphics scales
84             for 2D plotting and can be used in conjunction with graphics
85             routines which request the current graphics scale (for instance
86             <literal>strf="x0z"</literal> or <literal>frameflag=0</literal> in
87             <function>plot2d</function>).
88         </para>
89         <para>
90             <literal>frect=[xmin, ymin, xmax, ymax]</literal> is used to set the
91             graphics scale and is just like the <varname>rect</varname> argument
92             of <function>plot2d</function>. If <varname>frect</varname> is not
93             given the current value of the graphic scale remains unchanged. the
94             default value of <varname>rect</varname> is <literal>[0,0,1,1]</literal>
95             (at window creation, when switching back to default value with
96             <code>xset('default')</code> or when clearing graphic recorded
97             events <code>clf()</code>).
98         </para>
99         <para>
100             <literal>arect=[x_left, x_right,y_up,y_down]</literal> is used to
101             set the graphic frame inside the sub-window. The graphic frame is
102             specified (like <varname>wrect</varname>) using proportion of the
103             width or height of the current graphic sub-window.  Default value is
104             <literal>1/8*[1,1,1,1]</literal>. If <varname>arect</varname> is not
105             given, current value remains unchanged.
106         </para>
107     </refsection>
108     <refsection>
109         <title>Examples</title>
110         <programlisting role="example"><![CDATA[ 
111 // To get a graphical explanation of xsetech parameters enter:
112 exec('SCI/modules/graphics/demos/xsetechfig.sce');
113
114 // Here xsetech is used to split the graphics window in two parts 
115 // first xsetech is used to set the first sub-window
116 // and the graphics scale 
117 xsetech([0,0,1.0,0.5],[-5,-3,5,3])
118 // we call plot2d with the "001" option to use the graphics scale 
119 // set by xsetech 
120 plot2d([1:10]',[1:10]',1,"001"," ")
121 // then xsetech is used to set the second sub-window
122 xsetech([0,0.5,1.0,0.5])
123 // the graphics scale is set by xsetech to [0,0,1,1] by default 
124 // and we change it with the use of the rect argument in plot2d 
125 plot2d([1:10]',[1:10]',1,"011"," ",[-6,-6,6,6])
126  ]]></programlisting>
127         <programlisting role="example"><![CDATA[ 
128 // Four plots on a single graphics window 
129 clf()
130 xset("font",2,0)
131 xsetech([0,0,0.5,0.5]);
132 plot3d()
133 xsetech([0.5,0,0.5,0.5]);
134 plot2d()
135 xsetech([0.5,0.5,0.5,0.5]);
136 grayplot()
137 xsetech([0,0.5,0.5,0.5]);
138 histplot()
139 // back to default values for the sub-window
140 xsetech([0,0,1,1])
141  ]]></programlisting>
142         <scilab:image>
143             xset("font",2,0)
144             xsetech([0,0,0.5,0.5]);
145             plot3d()
146             xsetech([0.5,0,0.5,0.5]);
147             plot2d()
148             xsetech([0.5,0.5,0.5,0.5]);
149             grayplot()
150             xsetech([0,0.5,0.5,0.5]);
151             histplot()
152             xsetech([0,0,1,1])
153         </scilab:image>
154         
155         <programlisting role="example"><![CDATA[ 
156 // One plot with changed arect 
157 clf()
158 xsetech(arect=[0,0,0,0]) 
159 x=1:0.1:10;plot2d(x',sin(x)')
160  ]]></programlisting>
161         <scilab:image>
162             xsetech(arect=[0,0,0,0]) 
163             x=1:0.1:10;plot2d(x',sin(x)')
164         </scilab:image>
165         <programlisting role="example"><![CDATA[ 
166 clf()
167 xsetech(arect=[1/8,1/8,1/16,1/4])
168 x=1:0.1:10;plot2d(x',sin(x)')
169 clf()
170  ]]></programlisting>
171         <scilab:image>
172             xsetech(arect=[1/8,1/8,1/16,1/4])
173             x=1:0.1:10;plot2d(x',sin(x)')
174         </scilab:image>
175     </refsection>
176     <refsection role="see also">
177         <title>See Also</title>
178         <simplelist type="inline">
179             <member>
180                 <link linkend="xgetech">xgetech</link>
181             </member>
182             <member>
183                 <link linkend="subplot">subplot</link>
184             </member>
185             <member>
186                 <link linkend="isoview">isoview</link>
187             </member>
188             <member>
189                 <link linkend="square">square</link>
190             </member>
191         </simplelist>
192     </refsection>
193 </refentry>