<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) ENPC - Jean-Philippe Chancelier
 *
 * 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: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="xtitle">
    <refnamediv>
        <refname>xtitle</refname>
        <refpurpose>add titles on a graphics
            window
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>xtitle(title,[x_label,[y_label,[z_label]]],&lt;opts_args&gt;)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>title,x_label,y_label, z_label</term>
                <listitem>
                    <para>matrices of strings.</para>
                    <para>
                        Starting from Scilab 5.2, it is possible to write <link linkend="math_rendering_features_in_graphic">LaTeX or MathML expression</link>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>&lt;opt_args&gt;</term>
                <listitem>
                    <para>
                        a sequence of statements <literal>key1=value1,
                            key2=value2
                        </literal>
                        ,... where keys may be <literal>boxed</literal> (see
                        below). In this case, the order has no special meaning.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>boxed</term>
                <listitem>
                    <para>an integer value. If it is 1, a box is drawn around each
                        title.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>xtitle</literal> add titles on a 2D or 3D plot. <literal>title</literal>
            is the general title and <emphasis role="bold">x_label</emphasis>, <emphasis role="bold">y_label</emphasis> and
            <emphasis role="bold">z_label</emphasis> are the titles on the three axis. If the arguments are
            matrices, each line of the matrices is displayed on a different line.
        </para>
        <para>
            Enter the command <literal>xtitle()</literal> to see a demo.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
plot3d() ;
// puts the titles
xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis' ) ;
// draw a box around the titles
xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis', boxed = %t );


// With LaTeX & MathML:
mathml="<mrow>      <mfrac>        <mrow>          <mi>d</mi>          <mi>y</mi>        </mrow>        <mrow>          <mi>d</mi>          <mi>x</mi>        </mrow>      </mfrac>      <mo>=</mo>      <mfrac>        <mn>1</mn>        <msup>          <mi>y</mi>          <mn>2</mn>        </msup>      </mfrac>    </mrow>";

xtitle( 'My surface is blue', 'X axis', '$Y axis$', mathml );
 ]]></programlisting>
        <scilab:image>
            plot3d() ;
            xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis' ) ;
        </scilab:image>

    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="titlepage">titlepage</link>
            </member>
            <member>
                <link linkend="label_properties">label_properties</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
