14
14
<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" version="5.0-subset Scilab" xml:lang="en" xml:id="clf">
16
<refname>clf</refname>
17
<refpurpose>clear or reset the current graphic figure
18
(window) to default values
22
<title>Calling Sequence</title>
23
<synopsis>clf(<opt_job_arg>)
24
clf(h,<opt_job_arg>)
25
clf(num,<opt_job_arg>)
29
<title>Arguments</title>
34
<para>a handle, the figure handle</para>
40
<para>a number, the figure_id</para>
44
<term><opt_job_arg></term>
47
a string ( <literal>'clear' </literal>or <literal>'reset'</literal> )
48
specifying the job for <literal>clf</literal>.
55
<title>Description</title>
57
The <literal>clf</literal> command is used to reset a figure to its default
58
values and/or to delete all its children.
61
If <literal>opt_job_arg</literal> string value is <literal>'clear'</literal> then
62
all children of the specified figure are deleted.
65
If <literal>opt_job_arg</literal> string value is <literal>'reset'</literal> then
66
not only all children of the specified figure are deleted but the figure
67
properties are reset to their default values using the default figure
68
model (see <link linkend="gdf">gdf</link>). The only exception are the <literal>axes_size</literal>
69
and <literal>figure_size</literal> properties which can not be reset if the figure
70
is docked with other elements.
73
<literal>clf(num)</literal> clear or reset the figure with
74
<literal>figure_id==num</literal>.
77
<literal>clf(h)</literal> clear or reset the figure pointed to by
78
the handle <literal>h</literal>.
81
<literal>clf()</literal> clear or reset the current figure.
84
<literal>clf</literal> function delete every children of specified windows including
85
menus and uicontrols added by user.
86
To prevent menus and uicontrols from being deleted, the <literal>delete(gca())</literal> command
87
might be used instead.
91
<title>Examples</title>
92
<programlisting role="example"><![CDATA[
16
<refname>clf</refname>
17
<refpurpose>clear or reset the current graphic figure
18
(window) to default values
22
<title>Calling Sequence</title>
23
<synopsis>clf(<opt_job_arg>)
24
clf(h,<opt_job_arg>)
25
clf(num,<opt_job_arg>)
29
<title>Arguments</title>
34
<para>a handle, the figure handle</para>
40
<para>a number, the figure_id</para>
44
<term><opt_job_arg></term>
47
a string ( <literal>'clear' </literal>or <literal>'reset'</literal> )
48
specifying the job for <literal>clf</literal>.
55
<title>Description</title>
57
The <literal>clf</literal> command is used to reset a figure to its default
58
values and/or to delete all its children.
61
If <literal>opt_job_arg</literal> string value is <literal>'clear'</literal> then
62
all children of the specified figure are deleted.
65
If <literal>opt_job_arg</literal> string value is <literal>'reset'</literal> then
66
not only all children of the specified figure are deleted but the figure
67
properties are reset to their default values using the default figure
68
model (see <link linkend="gdf">gdf</link>). The only exception are the <literal>axes_size</literal>
69
and <literal>figure_size</literal> properties which can not be reset if the figure
70
is docked with other elements.
73
<literal>clf(num)</literal> clear or reset the figure with
74
<literal>figure_id==num</literal>.
77
<literal>clf(h)</literal> clear or reset the figure pointed to by
78
the handle <literal>h</literal>.
81
<literal>clf()</literal> clear or reset the current figure.
84
<literal>clf</literal> function delete every children of specified windows including
85
menus and uicontrols added by user.
86
To prevent menus and uicontrols from being deleted, the <literal>delete(gca())</literal> command
87
might be used instead.
91
<title>Examples</title>
92
<programlisting role="example"><![CDATA[
93
93
f4=scf(4); //creates figure with id==4 and make it the current one
94
94
f4.color_map = jetcolormap(64);
95
95
f4.figure_size = [400, 200];
107
107
clf(gcf(),'reset')
108
108
plot3d1(t,t,sin(t)'*cos(t)); // color_map changed (back to the default one with 32 colors)
109
109
]]></programlisting>
111
<refsection role="see also">
112
<title>See Also</title>
113
<simplelist type="inline">
115
<link linkend="set">set</link>
118
<link linkend="get">get</link>
121
<link linkend="gcf">gcf</link>
124
<link linkend="gdf">gdf</link>
127
<link linkend="scf">scf</link>
130
<link linkend="graphics_entities">graphics_entities</link>
111
<refsection role="see also">
112
<title>See Also</title>
113
<simplelist type="inline">
115
<link linkend="set">set</link>
118
<link linkend="get">get</link>
121
<link linkend="gcf">gcf</link>
124
<link linkend="gdf">gdf</link>
127
<link linkend="scf">scf</link>
130
<link linkend="graphics_entities">graphics_entities</link>