summaryrefslogtreecommitdiff
path: root/modules/gui/help/en_US/figure.xml
blob: be740a8df8b520d137d55ddd10c2678d9d243763 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<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="figure">
    <refnamediv>
        <refname>figure</refname>
        <refpurpose>create a figure</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>
            f = figure(num);
            f = figure("PropertyName1", Propertyvalue1, ..., ..., "PropertyNameN", PropertyvalueN);
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Description</title>
        <para>
            This routine creates a figure. If an ID is given, the figure corresponding to this ID is created.
            Otherwise, the window is created with the first free ID, that is the lowest integer not already used by a window.
        </para>
    </refsection>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>num</term>
                <listitem>
                    <para>ID of the window to create. If not specified, the first free ID is used.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>PropertyName{1, ..., N}</term>
                <listitem>
                    <para>character string name of a property to set. One of the property names listed below.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>PropertyValue{1, ..., N}</term>
                <listitem>
                    <para>scilab object value to give to the corresponding property.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>f</term>
                <listitem>
                    <para>handle of the newly created window.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Properties</title>
        <variablelist>
            <varlistentry>
                <term>BackgroundColor</term>
                <listitem>
                    <para>[1,3] real vector or string Background color of the figure. A
                        color is specified as Red, Green and Blue values. Those values are
                        real in [0,1]. The color can be given as a real vector, ie [R,G,B] or
                        a string where each value is separated by a "|", ie "R|G|B"
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Figure_name</term>
                <listitem>
                    <para>character string, allows to set the title of the figure.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Position</term>
                <listitem>
                    <para>allows to control the geometrical aspect of the figure.
                        It is a [1,4] real vector [x y width height] where the letters stand for the x
                        location of the top left corner, the y location of the top left corner, the width and the height of the virtual graphics window
                        (the part of the figure which contains uicontrols and graphics).
                        See the <emphasis role="bold">axes_size</emphasis> property description in <link linkend="figure_properties">figure properties</link> help page.
                        One can also set this property by giving a string where the fields are separated by a "|", ie "x|y|width|height".
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Tag</term>
                <listitem>
                    <para>string this property is generally used to identify the figure. It
                        allows to give it a "name". Mainly used in conjontion with findobj().
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Userdata</term>
                <listitem>
                    <para>this can be used to associate some Scilab objects to a figure.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
// Create figure having figure_id==3
h=figure(3);
// Add a text uicontrol in figure 3
uicontrol(h, "style", "text", ...
             "string", "This is a figure", ...
             "position", [50 70 100 100], ...
             "fontsize",15);

// Create figure having figure_id==1
figure();
// Add a text uicontrol in figure 1
uicontrol("style", "text", ...
          "string", "Another figure", ...
          "position", [50 70 100 100], ...
          "fontsize", 15);

// Close current figure (ie figure 1)
close();
// close figure 3
close(h);
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="close">close</link>
            </member>
            <member>
                <link linkend="gcf">gcf</link>
            </member>
            <member>
                <link linkend="createWindow">createWindow</link>
            </member>
        </simplelist>
    </refsection>
</refentry>