<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>xs2fig</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="xs2fig"> send graphics to a file in Xfig syntax</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>xs2fig(win_num,filen,[color])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>win_num</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer scalar or vector .</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>filen</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string, file name.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>color</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: optional integer. 0 means black and white and 1 means color. The default value is to use a value compatible  with the screen status.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>xs2fig</VERB> sends the recorded graphics of the
    window <VERB>win_num</VERB> in the file <VERB>filen</VERB> in Xfig syntax.
    This function works only if the selected 
    driver is <VERB>&quot;Rec&quot;</VERB>  or if the window is in &quot;new
      style&quot;.</P>

    <P>To convert a sequence of &quot;GIF&quot;  files to an animated GIF file
      one can use the &quot;convert&quot; program for ImageMagic
      (http://www.imagemagick.org/)</P>

    <P>For example if one has generated a sequence of Gif files named
      <VERB>img*.gif</VERB> it is possible to build an animated Gif file (named
      anim.gif) by</P> 
    <VERBATIM>
    <![CDATA[
    convert -delay 10  img*.gif anim.gif  
     ]]>
    </VERBATIM>

  </DESCRIPTION>
  <EXAMPLE><![CDATA[ 
    scf(0)
    plot2d()
    xs2fig(0,'foo.fig')
  ]]></EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>xs2ps</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>xs2gif</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>xs2ppm</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
