1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) ENPC - Jean-Philippe Chancelier
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
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="xset">
15 <refname>xset</refname>
17 set values of the graphics context. <emphasis role="bold">This function is obsolete.</emphasis>
21 <title>Calling Sequence</title>
23 xset(choice_name, x1, x2, x3, x4, x5)
28 <title>Arguments</title>
31 <term>choice_name</term>
37 <term>x1, ..., x5</term>
40 depending on <literal>choice_name</literal>.
47 <title>Description</title>
50 This function is obsolete.
52 Use the Scilab graphic objects representation instead (see the
53 <link linkend="set">set</link> and <link linkend="get">get</link>
54 functions as well as the <link linkend="graphics_entities">graphics
60 <function>xset</function> is used to set default values of the
61 current window graphic context.
64 When called no argument, a choice menu is created showing the
65 current values and changes can be performed through toggle buttons.
68 Use <code>xset()</code> to display or set the current color, mark
74 <term>xset("auto clear","on"|"off")</term>
77 Switch <literal>"on"</literal> or <literal>"off"</literal>
78 the auto clear mode for graphics. When the auto clear
79 mode is <literal>"on"</literal>, successive plots are
80 not superposed, i.e. a <code>clf()</code> operation (the
81 graphics window is cleared and the associated recorded
82 graphics is erased) is performed before each high
83 level graphics function. Default value is <literal>"off"</literal>.
88 <term>xset("background",color)</term>
91 Set the background color of the current <literal>Axes</literal>
92 object. The <literal>color</literal> argument is the
93 colormap index of the color to use.
98 <term>xset("clipping", x, y, w, h)</term>
101 Set the clipping zone (the zone of the graphics window
102 where plots can be drawn) to the rectangle
103 <literal>(x,y,w,h)</literal> (Upper-Left point, Width,
104 Height). This function uses the current coordinates of
110 <term>xset("color",value)</term>
113 Set the default color for filling, line or text drawing
114 functions. <literal>value</literal> is an integer
115 projected in the interval <literal>[0,whiteid]</literal>.
116 0 is used for black filling and <literal>whiteid</literal> for white. The
117 value of <literal>whiteid</literal> can be obtained with <code>xget("white")</code>.
122 <term>xset("colormap",cmap)</term>
125 Set the colormap as a <literal>m x 3</literal> matrix,
126 where <literal>m</literal> is the number of colors.
127 Color number <literal>i</literal> is given as a 3-uple
128 <literal>cmap(i,1)</literal>, <literal>cmap(i,2)</literal>,
129 <literal>cmap(i,3)</literal> corresponding respectively
130 to red, green and blue intensity between 0 and 1.
135 <term>xset("dashes",i)</term>
138 In black and white mode (<code>xset("use color",0)</code>),
139 set the dash style to style <literal>i</literal> (0 for
140 solid line). In color mode (<code>xset("use color",1)</code>)
141 this is used to set line, mark and text color.
143 This keyword is obsolete, please use
144 <literal>xset('color',i)</literal> or
145 <literal>xset('line style',i)</literal> instead.
151 <term>xset("default")</term>
154 Reset the graphics context to default values.
159 <term>xset("font", fontid, fontsize):</term>
162 Set the current font and its current size. Note that
163 <literal>fontsize</literal> applies to all fonts not
164 only <literal>fontid</literal>.
169 <term>xset("font size", fontsize)</term>
171 <para>Set the fonts size.</para>
175 <term>xset("foreground",color)</term>
178 Set the foreground color of the current <literal>Axes</literal>
179 object. The <literal>color</literal> argument is the
180 colormap index of the color to use.
185 <term>xset("fpf", string)</term>
188 Set the floating point format for number display in
189 contour functions. <literal>string</literal> is a string
190 giving the format in C format syntax (for example
191 <code>string="%.3f"</code>). Use
192 <code>string=""</code> to switch back to default format.
197 <term>xset("hidden3d", colorid): </term>
200 Set the color number for backward facing faces in
201 <function>plot3d</function>. <literal>colorid=0</literal>
202 zero suppress the drawing of backward facing faces of 3d
203 objects. This is technically called 'culling' and speeds
204 up the rendering of closed surfaces.
209 <term>xset("line mode", type)</term>
212 This function is used to set the line drawing mode.
213 Absolute mode is set with <literal>type=1</literal> and
214 relative mode with type=0.
215 <warning>The mode type=0 has bugs.</warning>
220 <term>xset("line style", value)</term>
223 Set the current line style (1 for solid, >1 for
229 <term>xset("mark", markid, marksize)</term>
232 Set the current mark and the current mark size. Use
233 <code>xset()</code> to see the marks. Note that
234 <literal>marksize</literal> applies to all marks not
235 only <literal>markid</literal>.
240 <term>xset("mark size", marksize)</term>
242 <para>Set the mark size.</para>
246 <term>xset("pattern", value)</term>
249 Set the current pattern for filling functions. value is
250 an integer projected in the interval
251 <literal>[0,whiteid]</literal>. 0 is used for black
252 filling and <literal>whiteid</literal> for white. The
253 value of <literal>whiteid</literal> can be obtained
254 with <code>xget("white")</code>.
255 <literal>"pattern"</literal> is equivalent to
256 <literal>"color"</literal>.
261 <term>xset("thickness", value)</term>
264 Set the thickness of lines in pixel (0 and 1 have the
265 same meaning: 1 pixel thick).
270 <term>xset("use color", flag)</term>
273 If <literal>flag=1</literal> then <code>xset("pattern", 1)</code> or
274 <code>xset("dashes", 1)</code> will be used so as to
275 change the default color for drawing or for filling
276 patterns. If <literal>flag=0</literal> then we switch
277 back to the gray and dashes mode.
282 <term>xset("viewport", x, y)</term>
284 <para>Set the position of the panner.</para>
288 <term>xset("wdim", width, height)</term>
291 Set the width and the height of the current graphics
292 window. This option is not used by the postscript
298 <term>xset("wpdim", width, height)</term>
301 Sets the width and the height of the current physical
302 graphic window (which can be different from the actual
303 size in mode <literal>wresize</literal> 1). This option
304 is not used by the postscript driver.
309 <term>xset("window", window_number)</term>
312 Set the current window to the window <literal>window_number</literal>
313 and creates the window if it does not exist.
318 <term>xset("wpos", [x, y])</term>
321 Set the position of the upper left point of the graphics
327 <term>xset("wresize",flag)</term>
330 If <literal>flag=1</literal> then the graphic is
331 automatically resized to fill the graphics window.
333 <programlisting role=""><![CDATA[
337 xset("wdim",1000,500)
340 If flag=0 the scale of the graphic is left unchanged
341 when the graphics window is resized. Top left panner or
342 keyboard arrows may be used to scroll over the graphic.
344 <programlisting role=""><![CDATA[
348 xset("wdim",1000,500)
354 <refsection role="see also">
355 <title>See Also</title>
356 <simplelist type="inline">
358 <link linkend="xget">xget</link>
361 <link linkend="getcolor">getcolor</link>
364 <link linkend="ged">ged</link>
367 <link linkend="set">set</link>
370 <link linkend="graphics_entities">graphics entities</link>
375 <title>History</title>
378 <revnumber>5.4.0</revnumber>
380 The "alufunction" property is no more supported, this property was no more used for rendering since Scilab 5.0.1.