1
xsetech Scilab Group Scilab Function xsetech
3
xsetech - set the sub-window of a graphics window for plotting
6
xsetech(wrect,[frect,logflag])
7
xsetech(wrect=[...],frect=[..],logflag="..", arect=[...])
10
wrect : vector of size 4, defining the sub-window to use.
12
frect : vector of size 4.
14
logflag : string of size 2 "xy", where x and y can be "n" or "l". "n"
15
stands for normal and "l" stands for logscale. x stands for the
16
x-axis and y stands for the y-axis.
18
arect : vector of size 4.
21
xsetech is mainly used to set the sub-window of the graphics window which
22
will be used for plotting. The sub-window is specified with the parameter
23
wrect=[x,y,w,h] (upper-left point, width, height). The values in wrect
24
are specified using proportion of the width or height of the current
25
graphic window. For instance wrect=[0,0,1,1] means that the whole
26
graphics window will be used, and wrect=[0.5,0,0.5,1] means that the
27
graphics region will be the right half of the graphics window. xsetech
28
also set the current graphics scales for 2D plotting and can be used in
29
conjunction with graphics routines which request the current graphics
30
scale (for instance strf="x0z" orframeflag=0 in plot2d).
31
frect=[xmin,ymin,xmax,ymax] is used to set the graphics scale and is just
32
like the rect argument of plot2d. If frect is not given the current value
33
of the graphic scale remains unchanged. the default value of rect is
34
[0,0,1,1] (at window creation, when switching back to default value with
35
xset('default') or when clearing graphic recorded events xbasc()).
36
arect=[x_left, x_right,y_up,y_down] is used to set the graphic frame
37
inside the subwindow. The graphic frame is specified (like wrect) using
38
proportion of the width or height of the current graphic subwindow.
39
Default value is 1/8*[1,1,1,1]. If arect is not given, current value
43
// To get a graphical explanation of xsetech parameters enter:
44
exec('SCI/demos/graphics/xsetechfig.sce');
47
// Here xsetech is used to split the graphics window in two parts
48
// first xsetech is used to set the first sub-window
49
// and the graphics scale
50
xsetech([0,0,1.0,0.5],[-5,-3,5,3])
51
// we call plot2d with the "001" option to use the graphics scale
53
plot2d([1:10]',[1:10]',1,"001"," ")
54
// then xsetech is used to set the second sub-window
55
xsetech([0,0.5,1.0,0.5])
56
// the graphics scale is set by xsetech to [0,0,1,1] by default
57
// and we change it with the use of the rect argument in plot2d
58
plot2d([1:10]',[1:10]',1,"011"," ",[-6,-6,6,6])
59
// Four plots on a single graphics window
62
xsetech([0,0,0.5,0.5]); plot3d()
63
xsetech([0.5,0,0.5,0.5]); plot2d()
64
xsetech([0.5,0.5,0.5,0.5]); grayplot()
65
xsetech([0,0.5,0.5,0.5]); histplot()
66
// back to default values for the sub-window
68
// One plot with changed arect
71
xsetech(arect=[0,0,0,0])
72
x=1:0.1:10;plot2d(x',sin(x)')
74
xsetech(arect=[1/8,1/8,1/16,1/4])
75
x=1:0.1:10;plot2d(x',sin(x)')
79
xgetech, subplot, isoview, square