Scilab Function
Last update : April 1993

xs2ps - send graphics to a file in PS syntax

Calling Sequence

xs2ps(win_num,filen,[color])

Parameters

Description

xs2ps sends the recorded graphics of the window win_num in the file filen in PS syntax. Warning: filen must not have extension.

This function works only if the selected driver is "Rec" in the window win_num or if the window is in "new style". The generated postscript file does not contrains the header part

Examples

 
    scf(0)
    plot2d()
    // Postcript export
    filename='foo'; // ! no extension
    xs2ps(0,filename)
    //add the Postscript file header and create <filename>.eps file
    if MSDOS then
      unix_s(pathconvert('""'+WSCI+'/bin/BEpsf'+'""',%f)+' -p ' +filename)
    else
      unix_s(pathconvert('SCI/bin/BEpsf',%f)+' -p ' +filename)
    end
    
    // Gif export
    xs2gif(0,'foo.gif')
    // ppm export
    xs2ppm(0,'foo.ppm')
  

See Also

set_posfig_dim ,   printing ,   xs2fig ,   xs2gif ,   xbasimp ,   xs2ppm ,