<?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="champ1">
    <refnamediv>
        <refname>champ1</refname>
        <refpurpose>
            2D vector field plot with colored arrows <emphasis role="bold">(obsolete)</emphasis>
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>champ1(x, y, fx, fy, [arfact, rect, strf])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>x, y</term>
                <listitem>
                    <para>two vectors which define the grid.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fx</term>
                <listitem>
                    <para>
                        a matrix which describes the x component of the vector
                        field. <literal>fx(i,j)</literal> is the x component of
                        the vector field at point <literal>(x(i),y(j))</literal>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fy</term>
                <listitem>
                    <para>
                        a matrix which describes the y component of the vector
                        field. <literal>fy(i,j)</literal> is the y component of
                        the vector field at point <literal>(x(i),y(j))</literal>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>arfact</term>
                <listitem>
                    <para>
                        an optional argument of type <literal>real</literal>
                        which gives a scale factor for the display of the arrow
                        heads on the plot (default value is 1.0).
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>rect</term>
                <listitem>
                    <para>
                        a vector <literal>rect = [xmin, ymin, xmax, ymax]</literal>
                        which gives the boundaries of the graphics frame to use.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>frameflag</term>
                <listitem>
                    <para>
                        controls the computation of the actual coordinate ranges
                        from the minimal requested values. The associated value
                        should be an integer ranging from 0 to 8.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>axesflag</term>
                <listitem>
                    <para>
                        specifies how the axes are drawn. The associated value
                        should be an integer ranging from 0 to 5.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>strf</term>
                <listitem>
                    <para>
                        a string of length 3 "xyz" which has the same meaning as
                        the <varname>strf</varname> parameter of <function>plot2d</function>.
                        The first character <literal>x</literal> has no effect
                        with <function>champ1</function>.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <warning>
                <literal>champ1() is obsolete and will be removed from Scilab 6.1.x</literal>.
                Please use the <literal>champ().colored</literal> property instead.
            </warning>
        </para>
        <para>
            <function>champ1</function> draws a 2D vector field with colored
            arrows. The color of the arrows depends on the intensity of the
            field.
        </para>
        <para>
            If you want arrows proportional to the intensity of the field, use
            <function>champ</function>.
        </para>
        <para>
            Enter the command <code>champ1()</code> to see a demo.
        </para>
        <para>
            Be cautioned about the fact that using <link linkend="meshgrid">meshgrid</link> function before
            using <code>champ1</code> requires adjustment. For more details, see the last example below.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
champ1(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
 ]]></programlisting>
        <scilab:image>
            champ1(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
        </scilab:image>
        <programlisting role="example"><![CDATA[
// using meshgrid to get fx and fy
clf()
x = linspace(-1,1,30);
y = linspace(-1,1,30);
[X,Y] = meshgrid(x,y);
fy = 2.*Y;
fx = 2.*X;
champ1(x,y,fx',fy'); //here we have transposed fx and fy
]]></programlisting>
        <scilab:image>
            x = linspace(-1,1,30);
            y = linspace(-1,1,30);
            [X,Y] = meshgrid(x,y);
            fy = 2.*Y;
            fx = 2.*X;
            champ1(x,y,fx',fy'); //here we have transposed fx and fy
        </scilab:image>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="champ">champ</link>
            </member>
            <member>
                <link linkend="fchamp">fchamp</link>
            </member>
            <member>
                <link linkend="plot2d">plot2d</link>
            </member>
        </simplelist>
    </refsection>
    <refsection role="history">
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>6.1.0</revnumber>
                <revdescription>
                    champ1() is declared obsolete. The champ().colored property replaces it.
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>
