<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - Djalel Abdemouche
 *
 * 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="delete">
    <refnamediv>
        <refname>delete</refname>
        <refpurpose>
            delete  a graphic entity and its children.
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            delete(h)
            delete(h,"callback")
            delete()
            delete("all")
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>h</term>
                <listitem>
                    <para>
                        a handle, the handle of the entity  to delete. <literal>h</literal> can be a vector of
                        handles, in which case all objects identified by h(i) will be deleted.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>"all"  </term>
                <listitem>
                    <para>string keyword (optional).</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            This routine can be used to delete a graphics entity identified
            by the handle given as argument. In this case, All children of
            this graphics entity will be deleted.
            Without any argument <literal>delete</literal> removes the
            current entity. With <literal>"all"</literal> argument it deletes
            all the entities of the current figure.
        </para>
        <para>
            The <literal>"callback"</literal> argument is not yet handled.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
subplot(211);
t=1:10;plot2d(t,t.^2),
subplot(223);
plot3d();
subplot(224);
plot2d();
xfrect(1,0,3,1);
a=get("current_axes")
delete(); //delete the graphics object newly created
delete(a.children); //delete all children of the current axes
delete(a); //delete the axes
delete("all"); //delete all the graphics objects of the figure
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="get">get</link>
            </member>
            <member>
                <link linkend="set">set</link>
            </member>
            <member>
                <link linkend="copy">copy</link>
            </member>
            <member>
                <link linkend="move">move</link>
            </member>
            <member>
                <link linkend="is_handle_valid">is_handle_valid</link>
            </member>
            <member>
                <link linkend="graphics_entities">graphics_entities</link>
            </member>
            <member>
                <link linkend="xdel">xdel</link>
            </member>
            <member>
                <link linkend="close">close</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
