scatter with extended polyline properties mark_size, mark_foreground, mark_background
[scilab.git] / scilab / modules / graphics / help / en_US / xchange.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  * 
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
11  *
12  -->
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="xchange">
14     <refnamediv>
15         <refname>xchange</refname>
16         <refpurpose>transform real to pixel coordinates</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>[x1, y1, rect] = xchange(x, y, dir)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x, y</term>
27                 <listitem>
28                     <para>
29                         two matrices of size <literal>(n1, n2)</literal>
30                         (coordinates of a set of points).
31                     </para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>dir</term>
36                 <listitem>
37                     <para>
38                         a string, parameter used to specify the conversion type
39                         (See "Description" for details).
40                     </para>
41                 </listitem>
42             </varlistentry>
43             <varlistentry>
44                 <term>x1, y1</term>
45                 <listitem>
46                     <para>
47                         two matrices of size <literal>(n1, n2)</literal>
48                         (coordinates of the set of points).
49                     </para>
50                 </listitem>
51             </varlistentry>
52             <varlistentry>
53                 <term>rect</term>
54                 <listitem>
55                     <para>a vector of size 4.</para>
56                 </listitem>
57             </varlistentry>
58         </variablelist>
59     </refsection>
60     <refsection>
61         <title>Description</title>
62         <para>
63             After having used a graphics function, <function>xchange</function>
64             computes pixel coordinates from real coordinates and conversely,
65             according to the value of the parameter <varname>dir</varname>:
66             <literal>"f2i"</literal> (float to int) means real to pixel and
67             <literal>"i2f"</literal> (int to float) means pixel to real.
68         </para>
69         <para>
70             <varname>x1</varname> and <varname>y1</varname> are the new
71             coordinates of the set of points defined by the old coordinates
72             <varname>x</varname> and <varname>y</varname>.
73         </para>
74         <para>
75             <varname>rect</varname> is the coordinates in pixel of the rectangle
76             in which the plot was done: <literal>[upper-left point, width, height]</literal>.
77         </para>
78     </refsection>
79     <refsection>
80         <title>Examples</title>
81         <programlisting role="example"><![CDATA[ 
82 t=[0:0.1:2*%pi]';
83 plot2d(t,sin(t))
84 [x,y,rect]=xchange(1,1,"f2i")
85 [x,y,rect]=xchange(0,0,"i2f")
86  ]]></programlisting>
87     </refsection>
88 </refentry>