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

  <TITLE>scf</TITLE>

  <TYPE>Scilab Function</TYPE>

  <DATE>4-May-2004</DATE>

  <SHORT_DESCRIPTION name="scf">set the current graphic figure
  (window)</SHORT_DESCRIPTION>

  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>f = scf()</CALLING_SEQUENCE_ITEM>

    <CALLING_SEQUENCE_ITEM>f = scf(h)</CALLING_SEQUENCE_ITEM>

    <CALLING_SEQUENCE_ITEM>f = scf(num)</CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>

  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>h</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: a handle, the figure handle</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>

      <PARAM_ITEM>
        <PARAM_NAME>num</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: a number, the figure_id</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>

      <PARAM_ITEM>
        <PARAM_NAME>f</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: the handle of the current figure</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>

  <DESCRIPTION>
    <SP>The current figure is the destination of the graphic drawing. The
    <VERB>scf</VERB> function allows to change this current figure or to
    create it if it does not already exist.</SP>

    <P></P>

    <P><VERB>scf(num)</VERB> set the figure with <VERB>figure_id==num</VERB>
    as the current figure. If it does not already exist it is created.</P>

    <P></P>

    <P><VERB>scf(h)</VERB> set the figure pointed to by the handle
    <VERB>h</VERB> as the current figure. If it does not already exist it is
    created.</P>

    <P><VERB>scf()</VERB> is equivalent to <VERB>scf(max(winsid())+1) </VERB>.
    It may be used to create a new graphic window.</P>
  </DESCRIPTION>

  <EXAMPLE><![CDATA[
   f4=scf(4); //creates figure with id==4 and make it the current one
   f0=scf(0); //creates figure with id==0 and make it the current one
   plot2d() //draw in current figure (id=0)
   scf(f4); // set first created figure as current one
   plot3d() //draw in current figure (id=4)
  ]]></EXAMPLE>

  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>set</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>get</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>gcf</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>clf</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>graphics_entities</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>

  <AUTHOR>S. Steer INRIA</AUTHOR>
</MAN>