<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>xsetech</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="xsetech"> set the sub-window of a graphics window for plotting</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>xsetech(wrect,[frect,logflag])  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>xsetech(wrect=[...],frect=[..],logflag=&quot;..&quot;, arect=[...])   </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>xsetech()  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>wrect</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of size 4, defining the sub-window to use.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>frect</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of size 4.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>logflag</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string of size 2 &quot;xy&quot;, where x and y can be &quot;n&quot; or &quot;l&quot;. &quot;n&quot; stands for  normal and &quot;l&quot; stands for logscale. x stands for the x-axis and y stands for the y-axis.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>arect</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of size 4.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>xsetech</VERB> is mainly used to set the sub-window of the graphics
    window which will be used for plotting. The sub-window is specified
    with the parameter <VERB>wrect=[x,y,w,h]</VERB> (upper-left point, width,
    height).  The values in <VERB>wrect</VERB> are specified using proportion of
    the width or height of the current graphic window. For instance
    <VERB>wrect=[0,0,1,1]</VERB> means that the whole graphics window will be
    used, and <VERB>wrect=[0.5,0,0.5,1]</VERB> means that the graphics region
    will be the right half of the graphics window.</P>
    <P><VERB>xsetech</VERB> also set the current graphics scales for 2D plotting and
    can be used in conjunction with graphics routines which request the
    current graphics scale (for instance <VERB>strf=&quot;x0z&quot;</VERB>
    or<VERB>frameflag=0</VERB> in <VERB>plot2d</VERB>).</P>
    <P><VERB>frect=[xmin,ymin,xmax,ymax]</VERB> is used to set the graphics scale
    and is just like the <VERB>rect</VERB> argument of <VERB>plot2d</VERB>. If
    <VERB>frect</VERB> is not given the current value of the graphic scale
    remains unchanged. the default value of <VERB>rect</VERB> is <VERB>[0,0,1,1]</VERB>
    (at window creation, when switching back to default value with
    <VERB>xset('default')</VERB> or when clearing graphic recorded events
    <VERB>xbasc()</VERB>).</P>
    <P><VERB>arect=[x_left, x_right,y_up,y_down]</VERB> is used to set the graphic
    frame inside the subwindow. The graphic frame is specified (like
    <VERB>wrect</VERB>) using proportion of the width or height of the current
    graphic subwindow.  Default value is <VERB>1/8*[1,1,1,1]</VERB>. If
    <VERB>arect</VERB> is not given, current value remains unchanged.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
// To get a graphical explanation of xsetech parameters enter:
exec('SCI/demos/graphics/xsetechfig.sce');


// Here xsetech is used to split the graphics window in two parts 
// first xsetech is used to set the first sub-window 
// and the graphics scale 
xsetech([0,0,1.0,0.5],[-5,-3,5,3])
// we call plot2d with the "001" option to use the graphics scale 
// set by xsetech 
plot2d([1:10]',[1:10]',1,"001"," ")
// then xsetech is used to set the second sub-window 
xsetech([0,0.5,1.0,0.5])
// the graphics scale is set by xsetech to [0,0,1,1] by default 
// and we change it with the use of the rect argument in plot2d 
plot2d([1:10]',[1:10]',1,"011"," ",[-6,-6,6,6])
// Four plots on a single graphics window 
xbasc()
xset("font",2,0)
xsetech([0,0,0.5,0.5]); plot3d()
xsetech([0.5,0,0.5,0.5]); plot2d()
xsetech([0.5,0.5,0.5,0.5]); grayplot()
xsetech([0,0.5,0.5,0.5]); histplot()
// back to default values for the sub-window 
xsetech([0,0,1,1])
// One plot with changed arect 
xbasc()
xset("default")
xsetech(arect=[0,0,0,0]) 
x=1:0.1:10;plot2d(x',sin(x)')
xbasc()
xsetech(arect=[1/8,1/8,1/16,1/4])
x=1:0.1:10;plot2d(x',sin(x)')
xbasc()
xset("default")
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>xgetech</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>subplot</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>isoview</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>square</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
  <AUTHOR>J.Ph.C.  </AUTHOR>
</MAN>
