2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) INRIA - Serge Steer
4 * Copyright (C) INRIA - Jean-Baptiste Silvy
5 * Copyright (C) Samuel GOUGEON : update after fix of bug 7411
7 * This file must be used under the terms of the CeCILL.
8 * This source file is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution. The terms
10 * are also available at
11 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
14 <refentry xml:lang="en" xml:id="clf">
16 <refname>clf</refname>
18 clear or reset the current graphic figure (window) to default values
22 <title>Calling Sequence</title>
24 clf(<opt_job_arg>)
25 clf(h,<opt_job_arg>)
26 clf(num,<opt_job_arg>)
30 <title>Arguments</title>
35 <para>a handle, the figure handle</para>
41 <para>a number, the figure_id</para>
45 <term><opt_job_arg></term>
48 string <literal>'clear'</literal> (default) or <literal>'reset'</literal>,
49 specifying the job for <literal>clf</literal>.
56 <title>Description</title>
58 The <literal>clf</literal> command is used to reset a figure to its default
59 values and/or to delete all its children.
63 <term>First input argument: </term>
70 <literal>clf(num,..)</literal> clears or resets the figure with <literal>figure_id==num</literal>
78 <literal>clf(h,..)</literal> clears or resets the figure pointed to by the handle <literal>h</literal>
86 <literal>clf(..)</literal> clears or resets the current figure.
94 <term>opt_job_arg</term>
98 <term>'clear' (default)</term>
101 <literal>clf(..,'clear')</literal> clears the targetted figure:
103 <listitem>all its <literal>children</literal> are deleted: axes, uicontrols, menus, and others.
104 To prevent menus and uicontrols from being deleted, the <literal>delete(gca())</literal> command
105 might be used instead.
107 <listitem>Its event handler is disabled: <literal>.event_handler_enable = "off"</literal>
109 <listitem>The message in the status bar is cleared: <literal>.info_message = ""</literal>
112 All other figure's properties are unchanged.
119 <para><literal>clf(..,'reset')</literal> deletes all children of the specified figure. In addition, all figure's
120 properties are reset to their default values as returned by <link linkend="gdf">gdf()</link>. The only exception are the
121 <literal>axes_size</literal>
122 and <literal>figure_size</literal> properties, which can not be reset if the figure
123 is docked with other elements.clears or resets the current figure.
133 <title>Examples</title>
134 <programlisting role="example">
135 f4=scf(4); //creates figure with id==4 and make it the current one
136 f4.color_map = jetcolormap(64);
137 f4.figure_size = [400, 200];
141 f0=scf(0); //creates figure with id==0 and make it the current one
142 f0.color_map=hotcolormap(128); // change color map
144 plot3d1(t,t,sin(t)'*cos(t));
146 clf() // equivalent to clf(gcf(),'clear')
147 plot3d1(t,t,sin(t)'*cos(t)); // color_map unchanged
150 plot3d1(t,t,sin(t)'*cos(t)); // color_map changed (back to the default one with 32 colors)
153 <refsection role="see also">
154 <title>See Also</title>
155 <simplelist type="inline">
157 <link linkend="figure_properties">figure properties</link>
160 <link linkend="gcf">gcf</link>
163 <link linkend="gdf">gdf</link>
166 <link linkend="scf">scf</link>
169 <link linkend="set">set</link>
172 <link linkend="get">get</link>
175 <link linkend="graphics_entities">graphics_entities</link>