xset: help page only 'fpf' + equivalences
[scilab.git] / scilab / modules / graphics / help / en_US / xset.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  * Copyright (C) 2017 - Samuel GOUGEON
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
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.
15  *
16  -->
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="xset">
21     <refnamediv>
22         <refname>xset</refname>
23         <refpurpose>
24             set values of the graphics context. <emphasis role="bold">This function is obsolete.</emphasis>
25         </refpurpose>
26     </refnamediv>
27     <refsynopsisdiv>
28         <title>Syntax</title>
29         <synopsis>
30             xset(choice_name, x1, x2, x3, x4, x5)
31         </synopsis>
32     </refsynopsisdiv>
33     <refsection>
34         <title>Arguments</title>
35         <variablelist>
36             <varlistentry>
37                 <term>choice_name</term>
38                 <listitem>
39                     <para>string</para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>x1, ..., x5</term>
44                 <listitem>
45                     <para>
46                         depending on <literal>choice_name</literal>.
47                     </para>
48                 </listitem>
49             </varlistentry>
50         </variablelist>
51     </refsection>
52     <refsection>
53         <title>Description</title>
54             <warning>
55                 This function is obsolete. Use the Scilab graphic objects representation instead:
56                 See equivalences here-below.
57             </warning>
58         <variablelist>
59             <varlistentry>
60                 <term>xset("fpf", string)</term>
61                 <listitem>
62                     <para>
63                         Set the floating point format for number display in
64                         contour functions. <literal>string</literal> is a string
65                         giving the format in C format syntax (for example
66                         <code>string="%.3f"</code>). Use
67                         <code>string=""</code> to switch back to default format.
68                     </para>
69                 </listitem>
70             </varlistentry>
71         </variablelist>
72         <refsect2>
73             <title>Replacements</title>
74             <para>
75             <literal>xset(..)</literal> returned nothing. Please take care appending a semi-colon
76             after replacement instructions in order to cancel the display of their output.
77             </para>
78         <screen><![CDATA[
79 // SCILAB 3 & 4                 SCILAB N>4
80 // ------------                 ----------
81 xset("default")                 clf("reset")
82
83 xset("wpos", [x y])             gcf().figure_position = [x y];
84 xset("wpdim", w, h)             gcf().figure_size = [w h];
85 xset("wdim", w, h)              gcf().figure_size = [w h];
86 xset("wresize", 0|1)  HS        gcf().auto_resize = "off"|"on";
87 xset("colormap", CM)            gcf().color_map = CM;
88 xset("figure", i)               scf(i);
89 xset("window", i)               scf(i);
90 xset("viewport", xp,yp)         gcf().viewport = [xp yp];
91
92 xset("auto clear","on"|"off")   gca().auto_clear = "on"|"off";
93 xset("line mode", 0|1)          gca().line_mode = "off"|"on";
94 xset("line style", n)           gca().line_style = n;
95 xset("dashes", n)               gca().line_style = n;
96 xset("thickness", n)            gca().thickness = n;
97 xset("font size", s)            gca().font_size = s;
98 xset("font", id, fsize)         set(gca(), "font_style", id, "font_size", fsize);
99 xset("mark size", msize)        set(gca(), "mark_size_unit", "tabulated", "mark_size", msize);
100 xset("mark", id, msize)         set(gca(), "mark_style", id, "mark_size_unit", "tabulated", "mark_size", msize);
101 xset("color", icol)             gca().foreground = icol;
102 xset("color", 0)                gca().foreground = -1;
103 xset("pattern", icol)           gca().foreground = icol;
104 xset("pattern", 0)              gca().foreground = -1;
105 xset("foreground", icol)        gca().foreground = icol;
106 xset("background", icol)        gca().background = icol;
107 xset("hidden3d", icol)          gca().hiddencolor = icol;
108
109 xset("clipping", rect)          set(gca(), "clip_box", rect, "clip_state", "on");
110 xset("clipgrf")                 gca().clip_state = "clipgrf";
111 xset("clipoff")                 gca().clip_state = "off";
112
113 xset("alufunction",i)           gcf().pixel_drawing_mode = str(i);
114                                 #i   str(i)
115                                 --   ------
116                                 0 => "clear"
117                                 1 => "and"
118                                 2 => "andReverse"
119                                 3 => "copy"
120                                 4 => "andInverted"
121                                 5 => "noop"
122                                 6 => "xor"
123                                 7 => "or"
124                                 8 => "nor"
125                                 9 => "equiv"
126                                 10 => "invert"
127                                 11 => "orReverse"
128                                 12 => "copyInverted"
129                                 13 => "orInverted"
130                                 14 => "nand"
131                                 15 => "set"
132 ]]></screen>
133         </refsect2>
134     </refsection>
135     <refsection role="see also">
136         <title>See also</title>
137         <simplelist type="inline">
138             <member>
139                 <link linkend="xget">xget</link>
140             </member>
141             <member>
142                 <link linkend="set">set</link>
143             </member>
144             <member>
145                 <link linkend="graphics_entities">graphics entities</link>
146             </member>
147             <member>
148                 <link linkend="gcf">gcf</link>
149             </member>
150             <member>
151                 <link linkend="gdf">gdf</link>
152             </member>
153             <member>
154                 <link linkend="gca">gca</link>
155             </member>
156             <member>
157                 <link linkend="gda">gda</link>
158             </member>
159             <member>
160                 <link linkend="ged">ged</link>
161             </member>
162             <member>
163                 <link linkend="getcolor">getcolor</link>
164             </member>
165         </simplelist>
166     </refsection>
167     <refsection>
168         <title>History</title>
169         <revhistory>
170             <revision>
171                 <revnumber>5.0.1</revnumber>
172                 <revremark>
173                     The <literal>.alufunction</literal> property is obsolete. It is no longer
174                     taken into account for graphical renderings. It is replaced with
175                     <literal>gcf().pixel_drawing_mode</literal>.
176                 </revremark>
177             </revision>
178             <revision>
179                 <revnumber>5.4.0</revnumber>
180                 <revremark>
181                     The <literal>"alufunction"</literal> is no longer supported..
182                 </revremark>
183             </revision>
184             <revision>
185                 <revnumber>6.0.0</revnumber>
186                 <revremark>
187                     The only <literal>xset("fpf", format)</literal> syntax is now supported.
188                 </revremark>
189             </revision>
190         </revhistory>
191     </refsection>
192 </refentry>