<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>

  <TITLE>xload</TITLE>

  <TYPE>Scilab Function</TYPE>

  <DATE>April 1993</DATE>

  <SHORT_DESCRIPTION name="xload">load a saved graphics</SHORT_DESCRIPTION>

  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>xload(file_name,[win_num])</CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>

  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>file_name</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: string, name of the file.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>

      <PARAM_ITEM>
        <PARAM_NAME>win_num</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: integer, the graphics window number. If not given, the current
          graphics window is used.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>

  <DESCRIPTION>
    <P><VERB>xload</VERB> reloads the graphics contained in the file
    <VERB>file_name</VERB> in the graphics window <VERB>win_num</VERB>.</P>

    <P>For files containing new graphics, the <VERB>load</VERB> function can
    be used instead of <VERB>xload</VERB>. <VERB>xload</VERB> does not restore
    the window number, the window size nor the window dimensions.</P>
  </DESCRIPTION>

  <EXAMPLE><![CDATA[

    //new style
    set figure_style new
    t=0:0.01:10;
    subplot(211),plot2d(t,sin(t))
    subplot(212),plot2d(t,sin(3*t))
    save(TMPDIR+'/foo.scg',gcf())
    clf()
    load(TMPDIR+'/foo.scg')
    
    a=gca();
    curve=a.children.children; //handle on the curve
    save(TMPDIR+'/foo.scg',curve)
    delete(curve)
    load(TMPDIR+'/foo.scg')
    

    //old style
    set figure_style old
    t=0:0.01:10;
    subplot(211),plot2d(t,sin(t))
    subplot(212),plot2d(t,sin(3*t))
    xsave(TMPDIR+'/foo.scg')
    xbasc()
    set figure_style old
    xload(TMPDIR+'/foo.scg')


 
  ]]></EXAMPLE>

  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>xsave</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>load</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>loadplots</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>save</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>

  <AUTHOR>J.Ph.C.</AUTHOR>
</MAN>