<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA
 * Copyright (C) 2009 - DIGITEO - Pierre Lando
 * Copyright (C) 2010 - DIGITEO - Yann Collette
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
          xmlns:scilab="http://www.scilab.org"  xml:id="plot2d" xml:lang="en">
    <refnamediv>
        <refname>plot2d</refname>
        <refpurpose>2D plot</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            plot2d([logflag,][x,],y[,style[,strf[,leg[,rect[,nax]]]]])
            plot2d([logflag,][x,],y,&lt;opt_args&gt;)
        </synopsis>
    </refsynopsisdiv>
    <refsection role="parameters">
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>x</term>
                <listitem>
                    <para>a real matrix or vector. If omitted, it is assumed to be the
                        vector <literal>1:n</literal> where <literal>n</literal> is the
                        number of curve points given by the <literal>y</literal>
                        parameter.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>y</term>
                <listitem>
                    <para>a real matrix or vector.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>&lt;opt_args&gt;</term>
                <listitem>
                    <para>This represents a sequence of statements
                        <literal>key1=value1,key2=value2</literal>,... where
                        <literal>key1</literal>, <literal>key2,...</literal> can be one of
                        the following:
                    </para>
                    <variablelist>
                        <varlistentry>
                            <term>logflag</term>
                            <listitem>
                                <para>sets the scale (linear or logarithmic) along the axes.
                                    The associated value should be a string with possible
                                    values: <literal>"nn"</literal>, <literal>"nl"</literal> ,
                                    <literal>"ln"</literal> and <literal>"ll"</literal> .
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>style</term>
                            <listitem>
                                <para>sets the style for each curve. The associated value
                                    should be a real vector with integer (positive or negative)
                                    values.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>strf</term>
                            <listitem>
                                <para>controls the display of captions.</para>
                                <para>
                                    <literal>strf</literal> is a string of length 3
                                    <literal>"xyz"</literal> (by default <literal>strf=
                                        "081"
                                    </literal>
                                    )
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>leg</term>
                            <listitem>
                                <para>sets the curves captions. The associated value should be
                                    a character string.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>rect</term>
                            <listitem>
                                <para>sets the minimal bounds requested for the plot. The
                                    associated value should be a real vector with four entries:
                                    <literal>[xmin,ymin,xmax,ymax]</literal>.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>nax</term>
                            <listitem>
                                <para>sets the axes labels and tics definition. The associated
                                    value should be a real vector with four integer entries
                                    <literal>[nx,Nx,ny,Ny].</literal>
                                </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 or 9 (default value).
                                </para>
                            </listitem>
                        </varlistentry>
                    </variablelist>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection role="description">
        <title>Description</title>
        <para>
            <literal>plot2d</literal> plots a set of 2D curves. If you are
            familiar with Matlab <literal>plot</literal> syntax, you should use <link linkend="plot">plot</link>.
        </para>
        <para>
            If <literal>x</literal> and <literal>y</literal> are vectors,
            plot2d(x,y,&lt;opt_args&gt;) plots vector <literal>y</literal> versus
            vector <literal>x</literal>. <literal>x</literal> and <literal>y</literal>
            vectors should have the same number of entries.
        </para>
        <para>
            If <literal>x</literal> is a vector and <literal>y</literal> a
            matrix plot2d(x,y,&lt;opt_args&gt;) plots each columns of
            <literal>y</literal> versus vector <literal>x</literal>. The
            number of rows of <literal>y</literal> must be equal to the number of
            <literal>x</literal> entries.
        </para>
        <para>
            If <literal>x</literal> and <literal>y</literal> are matrices,
            plot2d(x,y,&lt;opt_args&gt;) plots each columns of <literal>y</literal>
            versus corresponding column of <literal>x</literal>.
            <literal>x</literal> and <literal>y</literal> must then have the same sizes.
        </para>
        <para>
            If <literal>y</literal> is a vector, plot2d(y,&lt;opt_args&gt;)
            plots vector <literal>y</literal> versus vector
            <literal>1:size(y,'*')</literal>.
        </para>
        <para>
            If <literal>y</literal> is a matrix, plot2d(y,&lt;opt_args&gt;)
            plots each columns of <literal>y</literal> versus vector
            <literal>1:size(y,1)</literal>.
        </para>
        <para>
            The <literal>&lt;opt_args&gt;</literal> arguments should be used to
            customize the plot
        </para>
        <variablelist>
            <varlistentry>
                <term>logflag</term>
                <listitem>
                    <para>This option may be used to set the scale (linear or
                        logarithmic) along the axes. The associated value should be a
                        string with possible values: <literal>"nn"</literal>,
                        <literal>"nl"</literal> , <literal>"ln"</literal> and
                        <literal>"ll"</literal>. <literal>"l"</literal> stands for
                        logarithmic scale and graduations and <literal>"n"</literal> for
                        normal scale.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>style</term>
                <listitem>
                    <para>This option may be used to specify how the curves are drawn.
                        If this option is specified, the associated value should be a vector
                        with as many entries as curves.
                    </para>
                    <itemizedlist>
                        <listitem>
                            <para>
                                if <literal>style(i)</literal> is strictly positive, the
                                curve is drawn as plain line and <literal>style(i)</literal>
                                defines the index of the color used to draw the curve (see <link linkend="getcolor">getcolor</link>). Note that the line style
                                and the thickness can be set through the polyline entity
                                properties (see <link linkend="polyline_properties">polyline_properties</link>).
                            </para>
                            <para>Piecewise linear interpolation is done between the given
                                curve points.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                if <literal>style(i)</literal> is negative or zero, the
                                given curve points are drawn using marks,
                                <literal>abs(style(i))</literal> defines the mark with id used.
                                Note that the marks color and marks sizes can be set through
                                the polyline entity properties (see <link linkend="polyline_properties">polyline_properties</link>).
                            </para>
                        </listitem>
                    </itemizedlist>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>strf</term>
                <listitem>
                    <para>
                        is a string of length 3 <literal>"xyz"</literal> (by default
                        <literal>strf= "081"</literal>)
                    </para>
                    <variablelist>
                        <varlistentry>
                            <term>x</term>
                            <listitem>
                                <para>controls the display of captions.</para>
                                <variablelist>
                                    <varlistentry>
                                        <term>x=0</term>
                                        <listitem>
                                            <para>no caption.</para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>x=1</term>
                                        <listitem>
                                            <para>captions are displayed. They are given by the
                                                optional argument <literal>leg</literal>.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                </variablelist>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>y</term>
                            <listitem>
                                <para>controls the computation of the actual coordinate ranges
                                    from the minimal requested values. Actual ranges can be larger
                                    than minimal requirements.
                                </para>
                                <variablelist>
                                    <varlistentry>
                                        <term>y=0</term>
                                        <listitem>
                                            <para>no computation, the plot use the previous (or
                                                default) scale
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=1</term>
                                        <listitem>
                                            <para>from the rect arg</para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=2</term>
                                        <listitem>
                                            <para>from the min/max of the x, y data</para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=3</term>
                                        <listitem>
                                            <para>built for an isometric scale from the rect
                                                arg
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=4</term>
                                        <listitem>
                                            <para>built for an isometric plot from the min/max of
                                                the x, y data
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=5</term>
                                        <listitem>
                                            <para>enlarged for pretty axes from the rect arg</para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=6</term>
                                        <listitem>
                                            <para>enlarged for pretty axes from the min/max of the
                                                x, y data
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=7</term>
                                        <listitem>
                                            <para>like y=1 but the previous plot(s) are redrawn to
                                                use the new scale
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>y=8</term>
                                        <listitem>
                                            <para>like y=2 but the previous plot(s) are redrawn to
                                                use the new scale
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                </variablelist>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>z</term>
                            <listitem>
                                <para>controls the display of information on the frame around
                                    the plot. If axes are requested, the number of tics can be
                                    specified by the <literal>nax</literal> optional
                                    argument.
                                </para>
                                <variablelist>
                                    <varlistentry>
                                        <term>z=0</term>
                                        <listitem>
                                            <para>nothing is drawn around the plot.</para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>z=1</term>
                                        <listitem>
                                            <para>axes are drawn, the y=axis is displayed on the
                                                left.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>z=2</term>
                                        <listitem>
                                            <para>the plot is surrounded by a box without
                                                tics.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>z=3</term>
                                        <listitem>
                                            <para>axes are drawn, the y=axis is displayed on the
                                                right.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>z=4</term>
                                        <listitem>
                                            <para>axes are drawn centred in the middle of the frame
                                                box.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                    <varlistentry>
                                        <term>z=5</term>
                                        <listitem>
                                            <para>axes are drawn so as to cross at point
                                                <literal>(0,0)</literal>. If point
                                                <literal>(0,0)</literal> does not lie inside the frame,
                                                axes will not appear on the graph.
                                            </para>
                                        </listitem>
                                    </varlistentry>
                                </variablelist>
                            </listitem>
                        </varlistentry>
                    </variablelist>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>leg</term>
                <listitem>
                    <para>This option may be used to sets the curve captions. It must be
                        a string with the form <literal>"leg1@leg2@...."</literal> where
                        <literal>leg1</literal> , <literal>leg2</literal> , etc. are
                        respectively the captions of the first curve, of the second curve,
                        etc. The default is <literal> " "</literal>.
                    </para>
                    <para>The curve captions are drawn on below the x-axis. This option
                        is not flexible enough, use the <link linkend="captions">captions</link> or <link linkend="legend">legend</link> functions preferably.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>rect</term>
                <listitem>
                    <para>This option may be used to set the minimal bounds requested
                        for the plot. If this option is specified, the associated value
                        should be a real vector with four entries:
                    </para>
                    <para>
                        <literal>[xmin,ymin,xmax,ymax]</literal>.
                        <literal>xmin</literal> and <literal>xmax</literal> defines the
                        bounds on the abscissae while <literal>ymin</literal> and
                        <literal>ymax</literal> defines the bounds on the ordinates.
                    </para>
                    <para>This argument may be used together with the
                        <literal>frameflag</literal> option to specify how the axes
                        boundaries are derived from the given <literal>rect</literal>
                        argument. If the <literal>frameflag</literal> option is not given,
                        it is supposed to be <literal>frameflag=7</literal>.
                    </para>
                    <para>The axes boundaries can also be customized through the axes
                        entity properties (see <link linkend="axes_properties">axes_properties</link>).
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>nax</term>
                <listitem>
                    <para>This option may be used to specify the axes labels and tics
                        definition. The associated value should be a real vector with four integer entries
                        <literal>[nx,Nx,ny,Ny]</literal>.
                    </para>
                    <para>
                        <literal>Nx</literal> gives the number of main tics to be used
                        on the x-axis (to use autoticks set it to -1), <literal>nx</literal> gives the number of
                        subtics to be drawn between two main x-axis tics.
                    </para>
                    <para>
                        <literal>Ny</literal> and <literal>ny</literal> give similar
                        information for the y-axis.
                    </para>
                    <para>
                        If <literal>axesflag</literal> option is not set
                        <literal>nax</literal> option supposes that
                        <literal>axesflag</literal> option has been set to 9.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>frameflag</term>
                <listitem>
                    <para>This option may be used to control the computation of the
                        actual coordinate ranges from the minimal requested values. Actual
                        ranges can be larger than minimal requirements.
                    </para>
                    <variablelist>
                        <varlistentry>
                            <term>frameflag=0</term>
                            <listitem>
                                <para>no computation, the plot use the previous (or default)
                                    scale.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=1</term>
                            <listitem>
                                <para>The actual range is the range given by the
                                    <literal>rect</literal> option.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=2</term>
                            <listitem>
                                <para>The actual range is computed from the min/max of the
                                    <literal>x</literal> and <literal>y</literal> data.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=3</term>
                            <listitem>
                                <para>The actual range is the range given by the
                                    <literal>rect</literal> option and enlarged to get an
                                    isometric scale.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=4</term>
                            <listitem>
                                <para>The actual range is computed from the min/max of the
                                    <literal>x</literal> and <literal>y</literal> data and
                                    enlarged to get an isometric scale.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=5</term>
                            <listitem>
                                <para>The actual range is the range given by the
                                    <literal>rect</literal> option and enlarged to get pretty axes
                                    labels.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=6</term>
                            <listitem>
                                <para>The actual range is computed from the min/max of the
                                    <literal>x</literal> and <literal>y</literal> data and
                                    enlarged to get pretty axes labels.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=7</term>
                            <listitem>
                                <para>
                                    like <literal>frameflag=1</literal> but the previous
                                    plot(s) are redrawn to use the new scale. Used to add the
                                    current graph to a previous one.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=8</term>
                            <listitem>
                                <para>
                                    like<literal>frameflag=2</literal> but the previous
                                    plot(s) are redrawn to use the new scale. Used to add the
                                    current graph to a previous one.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>frameflag=9</term>
                            <listitem>
                                <para>
                                    like<literal>frameflag=8</literal> but the range is
                                    enlarged to get pretty axes labels. This is the default
                                    value.
                                </para>
                            </listitem>
                        </varlistentry>
                    </variablelist>
                    <para>The axes boundaries can also be customized through the axes
                        entity properties (see <link linkend="axes_properties">axes_properties</link>)
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>axesflag</term>
                <listitem>
                    <para>This option may be used to specify how the axes are drawn. The
                        associated value should be an integer ranging from 0 to 5 :
                    </para>
                    <variablelist>
                        <varlistentry>
                            <term>axesflag=0</term>
                            <listitem>
                                <para>nothing is drawn around the plot (axes_visible=["off"
                                    "off"];box="off").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=1</term>
                            <listitem>
                                <para>axes are drawn, the y-axis is displayed on the left
                                    (axes_visible=["on" "on"];box="on",y_location="left").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=2</term>
                            <listitem>
                                <para>the plot is surrounded by a box without tics
                                    (axes_visible=["off" "off"];box="on").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=3</term>
                            <listitem>
                                <para>axes are drawn, the y-axis is displayed on the
                                    right (axes_visible=["on"
                                    "on"];box="off",y_location="right").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=4</term>
                            <listitem>
                                <para>axes are drawn centered in the middle of the frame, the box
                                    being not drawn (axes_visible=["on" "on"];box="off",x_location="middle",
                                    y_location="middle").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=5</term>
                            <listitem>
                                <para>axes are drawn centered in the middle of the frame similarly to
                                    <literal>axesflag=4</literal>, the difference being that the box is drawn
                                    (axes_visible=["on" "on"];box="on",x_location="middle",y_location="middle").
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>axesflag=9</term>
                            <listitem>
                                <para>axes are drawn, the y-axis is displayed on the left
                                    (axes_visible=["on" "on"];box="off",y_location="left"). This
                                    is the default value.
                                </para>
                            </listitem>
                        </varlistentry>
                    </variablelist>
                    <para>The axes aspect can also be customized through the axes
                        entity properties (see <link linkend="axes_properties">axes_properties</link>).
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection role="description">
        <title>More information</title>
        <para>By default, successive plots are superposed. To clear the previous plot, use
            <literal>
                <link linkend="clf">clf()</link>
            </literal>
            .
        </para>
        <para>
            Enter the command <literal>plot2d()</literal> to see a demo.
        </para>
        <para>Other high level plot2d functions exist:</para>
        <itemizedlist>
            <listitem>
                <para>
                    plot2d2 same as <literal>plot2d</literal> but the curve is
                    supposed to be piecewise constant.
                </para>
            </listitem>
            <listitem>
                <para>
                    plot2d3 same as <literal>plot2d</literal> but the curve is
                    plotted with vertical bars.
                </para>
            </listitem>
            <listitem>
                <para>
                    plot2d4 same as <literal>plot2d</literal> but the curve is
                    plotted with vertical arrows.
                </para>
            </listitem>
        </itemizedlist>
    </refsection>
    <refsection role="examples">
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
// x initialisation
x=[0:0.1:2*%pi]';
//simple plot
plot2d(sin(x));
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(sin(x));
        </scilab:image>
        <programlisting role="example"><![CDATA[
clf();
x=[0:0.1:2*%pi]';
plot2d(x,sin(x));
//multiple plot
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,sin(x));
        </scilab:image>
        <programlisting role="example"><![CDATA[
clf();
x=[0:0.1:2*%pi]';
plot2d(x,[sin(x) sin(2*x) sin(3*x)])
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,[sin(x) sin(2*x) sin(3*x)])
        </scilab:image>
        <programlisting role="example"><![CDATA[
// multiple plot giving the dimensions of the frame
clf();
x=[0:0.1:2*%pi]';
plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5]);
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5]);
        </scilab:image>
        <programlisting role="example"><![CDATA[
//multiple plot with captions and given tics + style
clf();
x=[0:0.1:2*%pi]';
plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
       [1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2]);
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
            [1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2]);
        </scilab:image>
        <programlisting role="example"><![CDATA[
// isoview
clf();
x=[0:0.1:2*%pi]';
plot2d(x,sin(x),1,frameflag= 4);
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,sin(x),1,frameflag= 4);
        </scilab:image>
        <programlisting role="example"><![CDATA[
// scale
clf();
x=[0:0.1:2*%pi]';
plot2d(x,sin(x),1,frameflag= 6);
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,sin(x),1,frameflag= 6);
        </scilab:image>
        <programlisting role="example"><![CDATA[
// auto scaling with previous plots + style
clf();
x=[0:0.1:2*%pi]';
plot2d(x,sin(x),-1);
plot2d(x,2*sin(x),12);
plot2d(2*x,cos(x),3);
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,sin(x),-1);
            plot2d(x,2*sin(x),12);
            plot2d(2*x,cos(x),3);
        </scilab:image>
        <programlisting role="example"><![CDATA[
// axis on the right
clf();
x=[0:0.1:2*%pi]';
plot2d(x,sin(x),leg="sin(x)");
a=gca(); // Handle on axes entity
a.y_location ="right";
 ]]></programlisting>
        <scilab:image>
            x=[0:0.1:2*%pi]';
            plot2d(x,sin(x),leg="sin(x)");
            a=gca(); // Handle on axes entity
            a.y_location ="right";
        </scilab:image>
        <programlisting role="example"><![CDATA[

// axis centered at (0,0)
clf();
x=[0:0.1:2*%pi]';
plot2d(x-4,sin(x),1,leg="sin(x)");
a=gca(); // Handle on axes entity
a.x_location = "origin";
a.y_location = "origin";
// Some operations on entities created by plot2d ...
isoview
a=gca();
a.children // list the children of the axes.
// There are a compound made of two polylines and a legend
poly1= a.children(1).children(1); //store polyline handle into poly1
poly1.foreground = 4; // another way to change the style...
poly1.thickness = 3;  // ...and the thickness of a curve.
poly1.clip_state='off'; // clipping control
leg = a.children(2); // store legend handle into leg
leg.font_style = 9;
leg.line_mode = "on";
isoview off
 ]]></programlisting>
        <scilab:image>
            // axis centered at (0,0)
            clf();
            x=[0:0.1:2*%pi]';
            plot2d(x-4,sin(x),1,leg="sin(x)");
            a=gca(); // Handle on axes entity
            a.x_location = "origin";
            a.y_location = "origin";
            // Some operations on entities created by plot2d ...
            isoview()
            a=gca();
            a.children // list the children of the axes.
            // There are a compound made of two polylines and a legend
            poly1= a.children(1).children(1); //store polyline handle into poly1
            poly1.foreground = 4; // another way to change the style...
            poly1.thickness = 3;  // ...and the thickness of a curve.
            poly1.clip_state='off'; // clipping control
            leg = a.children(2); // store legend handle into leg
            leg.font_style = 9;
            leg.line_mode = "on";
            isoview("off")
        </scilab:image>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="plot">plot</link>
            </member>
            <member>
                <link linkend="plot2d2">plot2d2</link>
            </member>
            <member>
                <link linkend="plot2d3">plot2d3</link>
            </member>
            <member>
                <link linkend="plot2d4">plot2d4</link>
            </member>
            <member>
                <link linkend="clf">clf</link>
            </member>
            <member>
                <link linkend="xdel">xdel</link>
            </member>
            <member>
                <link linkend="delete">delete</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
