e43ea32b995b9379e207d7e7ecf9818f9753f79c
[scilab.git] / scilab / modules / graphics / help / en_US / load_save / xload.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) ENPC - Jean-Philippe Chancelier
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <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="xload">
17     <refnamediv>
18         <refname>xload</refname>
19         <refpurpose>load a saved graphics</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>xload(file_name,[win_num])</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>file_name</term>
30                 <listitem>
31                     <para>string, name of the file.</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>win_num</term>
36                 <listitem>
37                     <para>integer, the graphics window number. If not given, the current
38                         graphics window is used.
39                     </para>
40                 </listitem>
41             </varlistentry>
42         </variablelist>
43     </refsection>
44     <refsection>
45         <title>Description</title>
46         <para>
47             <literal>xload</literal> reloads the graphics contained in the file
48             <literal>file_name</literal> in the graphics window <literal>win_num</literal>.
49         </para>
50         <para>
51             Since  Scilab 5.0, all <link linkend="uimenu">uimenu</link> or <link linkend="uicontrol">uicontrol</link> handles are also loaded.
52         </para>
53         <para>
54             For files containing graphics, the <literal>load</literal> function can
55             be used instead of <literal>xload</literal>. <literal>xload</literal> does not restore
56             the window number, the window size nor the window dimensions.
57         </para>
58     </refsection>
59     <refsection>
60         <title>Examples</title>
61         <programlisting role="example"><![CDATA[
62 t=0:0.01:10;
63 subplot(211),plot2d(t,sin(t))
64 subplot(212),plot2d(t,sin(3*t))
65 xsave(TMPDIR + "/foo.scg", gcf())
66 clf()
67 xload(TMPDIR + "/foo.scg")
68
69 a=gca();
70 curve=a.children.children; //handle on the curve
71 save(TMPDIR + "/foo.scg", "curve")
72 delete(curve)
73 load(TMPDIR + "/foo.scg")
74  ]]></programlisting>
75     </refsection>
76     <refsection role="see also">
77         <title>See also</title>
78         <simplelist type="inline">
79             <member>
80                 <link linkend="xsave">xsave</link>
81             </member>
82             <member>
83                 <link linkend="load">load</link>
84             </member>
85             <member>
86                 <link linkend="save">save</link>
87             </member>
88         </simplelist>
89     </refsection>
90 </refentry>