1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) ENPC - Jean-Philippe Chancelier
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
-->
<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">
<refnamediv>
<refname>xset</refname>
<refpurpose>
set values of the graphics context. <emphasis role="bold">This function is obsolete.</emphasis>
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>
xset(choice_name, x1, x2, x3, x4, x5)
xset()
</synopsis>
</refsynopsisdiv>
<refsection>
<title>Arguments</title>
<variablelist>
<varlistentry>
<term>choice_name</term>
<listitem>
<para>string</para>
</listitem>
</varlistentry>
<varlistentry>
<term>x1, ..., x5</term>
<listitem>
<para>
depending on <literal>choice_name</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<para>
<warning>
This function is obsolete.
</warning>
Use the Scilab graphic objects representation instead (see the
<link linkend="set">set</link> and <link linkend="get">get</link>
functions as well as the <link linkend="graphics_entities">graphics
entities
</link>
help page).
</para>
<para>
<function>xset</function> is used to set default values of the
current window graphic context.
</para>
<para>
When called no argument, a choice menu is created showing the
current values and changes can be performed through toggle buttons.
</para>
<para>
Use <code>xset()</code> to display or set the current color, mark
and fonts used.
</para>
<para/>
<variablelist>
<varlistentry>
<term>xset("auto clear","on"|"off")</term>
<listitem>
<para>
Switch <literal>"on"</literal> or <literal>"off"</literal>
the auto clear mode for graphics. When the auto clear
mode is <literal>"on"</literal>, successive plots are
not superposed, i.e. a <code>clf()</code> operation (the
graphics window is cleared and the associated recorded
graphics is erased) is performed before each high
level graphics function. Default value is <literal>"off"</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("background",color)</term>
<listitem>
<para>
Set the background color of the current <literal>Axes</literal>
object. The <literal>color</literal> argument is the
colormap index of the color to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("clipping", x, y, w, h)</term>
<listitem>
<para>
Set the clipping zone (the zone of the graphics window
where plots can be drawn) to the rectangle
<literal>(x,y,w,h)</literal> (Upper-Left point, Width,
Height). This function uses the current coordinates of
the plot.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("color",value)</term>
<listitem>
<para>
Set the default color for filling, line or text drawing
functions. <literal>value</literal> is an integer
projected in the interval <literal>[0,whiteid]</literal>.
0 is used for black filling and <literal>whiteid</literal> for white. The
value of <literal>whiteid</literal> can be obtained with <code>xget("white")</code>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("colormap",cmap)</term>
<listitem>
<para>
Set the colormap as a <literal>m x 3</literal> matrix,
where <literal>m</literal> is the number of colors.
Color number <literal>i</literal> is given as a 3-uple
<literal>cmap(i,1)</literal>, <literal>cmap(i,2)</literal>,
<literal>cmap(i,3)</literal> corresponding respectively
to red, green and blue intensity between 0 and 1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("dashes",i)</term>
<listitem>
<para>
In black and white mode (<code>xset("use color",0)</code>),
set the dash style to style <literal>i</literal> (0 for
solid line). In color mode (<code>xset("use color",1)</code>)
this is used to set line, mark and text color.
<warning>
This keyword is obsolete, please use
<literal>xset('color',i)</literal> or
<literal>xset('line style',i)</literal> instead.
</warning>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("default")</term>
<listitem>
<para>
Reset the graphics context to default values.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("font", fontid, fontsize):</term>
<listitem>
<para>
Set the current font and its current size. Note that
<literal>fontsize</literal> applies to all fonts not
only <literal>fontid</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("font size", fontsize)</term>
<listitem>
<para>Set the fonts size.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("foreground",color)</term>
<listitem>
<para>
Set the foreground color of the current <literal>Axes</literal>
object. The <literal>color</literal> argument is the
colormap index of the color to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("fpf", string)</term>
<listitem>
<para>
Set the floating point format for number display in
contour functions. <literal>string</literal> is a string
giving the format in C format syntax (for example
<code>string="%.3f"</code>). Use
<code>string=""</code> to switch back to default format.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("hidden3d", colorid): </term>
<listitem>
<para>
Set the color number for backward facing faces in
<function>plot3d</function>. <literal>colorid=0</literal>
zero suppress the drawing of backward facing faces of 3d
objects. This is technically called 'culling' and speeds
up the rendering of closed surfaces.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("line mode", type)</term>
<listitem>
<para>
This function is used to set the line drawing mode.
Absolute mode is set with <literal>type=1</literal> and
relative mode with type=0.
<warning>The mode type=0 has bugs.</warning>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("line style", value)</term>
<listitem>
<para>
Set the current line style (1 for solid, >1 for
dashed lines).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("mark", markid, marksize)</term>
<listitem>
<para>
Set the current mark and the current mark size. Use
<code>xset()</code> to see the marks. Note that
<literal>marksize</literal> applies to all marks not
only <literal>markid</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("mark size", marksize)</term>
<listitem>
<para>Set the mark size.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("pattern", value)</term>
<listitem>
<para>
Set the current pattern for filling functions. value is
an integer projected in the interval
<literal>[0,whiteid]</literal>. 0 is used for black
filling and <literal>whiteid</literal> for white. The
value of <literal>whiteid</literal> can be obtained
with <code>xget("white")</code>.
<literal>"pattern"</literal> is equivalent to
<literal>"color"</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("thickness", value)</term>
<listitem>
<para>
Set the thickness of lines in pixel (0 and 1 have the
same meaning: 1 pixel thick).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("use color", flag)</term>
<listitem>
<para>
If <literal>flag=1</literal> then <code>xset("pattern", 1)</code> or
<code>xset("dashes", 1)</code> will be used so as to
change the default color for drawing or for filling
patterns. If <literal>flag=0</literal> then we switch
back to the gray and dashes mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("viewport", x, y)</term>
<listitem>
<para>Set the position of the panner.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("wdim", width, height)</term>
<listitem>
<para>
Set the width and the height of the current graphics
window. This option is not used by the postscript
driver.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("wpdim", width, height)</term>
<listitem>
<para>
Sets the width and the height of the current physical
graphic window (which can be different from the actual
size in mode <literal>wresize</literal> 1). This option
is not used by the postscript driver.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("window", window_number)</term>
<listitem>
<para>
Set the current window to the window <literal>window_number</literal>
and creates the window if it does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("wpos", x, y)</term>
<listitem>
<para>
Set the position of the upper left point of the graphics
window.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>xset("wresize",flag)</term>
<listitem>
<para>
If <literal>flag=1</literal> then the graphic is
automatically resized to fill the graphics window.
</para>
<programlisting role=""><![CDATA[
xdel();
xset("wresize",1);
plot2d();
xset("wdim",1000,500)
]]></programlisting>
<para>
If flag=0 the scale of the graphic is left unchanged
when the graphics window is resized. Top left panner or
keyboard arrows may be used to scroll over the graphic.
</para>
<programlisting role=""><![CDATA[
xdel();
plot2d();
xset("wresize",0);
xset("wdim",1000,500)
]]></programlisting>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="xget">xget</link>
</member>
<member>
<link linkend="getcolor">getcolor</link>
</member>
<member>
<link linkend="ged">ged</link>
</member>
<member>
<link linkend="set">set</link>
</member>
<member>
<link linkend="graphics_entities">graphics entities</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>History</title>
<revhistory>
<revision>
<revnumber>5.4.0</revnumber>
<revremark>
The "alufunction" property is no more supported, this property was no more used for rendering since Scilab 5.0.1.
</revremark>
</revision>
</revhistory>
</refsection>
</refentry>
|