summaryrefslogtreecommitdiff
path: root/modules/graphics/help/en_US/xgetech.xml
blob: dd85bd935a07dd7adf4a8c6ac50804ad2ae1ca10 (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
<?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="xgetech">
    <refnamediv>
        <refname>xgetech</refname>
        <refpurpose>get the current graphics scale</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[wrect, frect, logflag, arect] = xgetech()</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>wrect, frect</term>
                <listitem>
                    <para>real vectors.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>logflag</term>
                <listitem>
                    <para>
                        string of size 2 <literal>"xy"</literal>.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <function>xgetech</function> returns the current graphics scale (of
            the current window). The rectangle <literal>[xmin, ymin, xmax,
                ymax]
            </literal>
            given by <varname>frect</varname> is the size of the
            whole graphics window. The plotting will be made in the region of
            the current graphics window specified by <varname>wrect</varname>.
        </para>
        <para>
            <literal>wrect=[x, y, w, h]</literal> (upper-left point, width,
            height) describes a region inside the graphics window. The values in
            <varname>wrect</varname> are specified using proportion of the width
            and height of the graphics window:
        </para>
        <para>
            <literal>wrect=[0, 0, 1, 1]</literal> means that the whole graphics
            window is used.
        </para>
        <para>
            <literal>wrect=[0.5, 0, 0.5, 1]</literal> means that the graphics
            region is the right half of the graphics window.
        </para>
        <para>
            <literal>logflag</literal> is a string of size 2
            <literal>"xy"</literal>, where <literal>x</literal> and
            <literal>y</literal> can be <literal>"n"</literal> or
            <literal>"l"</literal>. <literal>"n"</literal> stands for normal (linear) scale and <literal>"l"</literal> stands for logscale.
            <literal>x</literal> stands for the x-axis and <literal>y</literal>
            stands for the y-axis.
        </para>
        <para>
            <literal>arect = [x_left, x_right, y_up, y_down]</literal> gives the
            frame size inside the subwindow. The graphic frame is specified
            (like <varname>wrect</varname>) using proportion of the width or
            height of the current graphic subwindow. Default value is
            <literal>1/8*[1,1,1,1]</literal>. If <varname>arect</varname> is not
            given, current value remains unchanged.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
// first subwindow 
xsetech([0,0,1.0,0.5])
plot2d()
// then xsetech is used to set the second sub window 
xsetech([0,0.5,1.0,0.5])
grayplot()
// get the graphic scales of first subwindow 
xsetech([0,0,1.0,0.5])
[wrect,frect,logflag,arect]=xgetech();
// get the graphic scales of second subwindow 
xsetech([0,0.5,1.0,0.5])
[wrect,frect,logflag,arect]=xgetech();
 ]]></programlisting>
        <scilab:image>
            xsetech([0,0,1.0,0.5])
            plot2d()
            xsetech([0,0.5,1.0,0.5])
            grayplot()
            xsetech([0,0,1.0,0.5])
            [wrect,frect,logflag,arect]=xgetech();
            xsetech([0,0.5,1.0,0.5])
            [wrect,frect,logflag,arect]=xgetech();
        </scilab:image>
        
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="xsetech">xsetech</link>
            </member>
        </simplelist>
    </refsection>
</refentry>