Some parameters of the graphics are controlled by a graphic context ( for example the line thickness) and others are controlled through graphics arguments of a plotting command. The graphics context has a default definition and can be change by the command xset : the command without argument i.e. xset() opens the Scilab Toggles Panel and the user can changes the parameters by simple mouse clickings. We give here different parameters controlled by this command :
(i)-xset("font",fontid,fontsize) : fix the current font and its current size.
(ii)-xset("mark",markid,marksize) : set the current mark and current mark size.
(iii)-xset("use color",flag) : change to color or gray plot according to the values (1 or 0) of flag.
(iv)-xset("colormap",cmap) : set the colormap as a m x 3 matrix. m is the number of colors. Color number i is given as a 3-uple cmap[i,1],cmap[i,2], cmap[i,3] corresponding respectively to Red, Green and Blue intensity between 0 and 1. Calling again xset() shows the colormap with the indices of the colors.
(v)-xset("window",window-number) : sets the current window to the window window-number and creates the window if it doesn't exist.
(vi)-xset("wpos",x,y) : fixes the position of the upper left point of the graphic window.
Many other choices are done by xset : -use of a pixmap : the plot can be directly displayed on the screen or executed on a pixmap and then expose by the command xset("wshow"); this is the usual way for animation effect.
-logical function for drawing : this parameter can be changed for specific effects (superposition or adding or substracting of colors). Looking at the successive plots of the following simple commands give an example of 2 possible effects of this parameter :
xset('default'); plot3d(); plot3d(); xset('alufunction',7); xset('window',0); plot3d(); xset('default'); plot3d(); xset('alufunction',6); xset('window',0); plot3d();
We have seen that some choices exist for the fonts and this choice can be extended by the command:
There exists the function ``reciprocal'' to xset :
All the values of the parameters fixed by xset can be obtained by xget. An example :
-->pos=xget("wpos") pos = ! 105. 121. !
pos is the position of the upper left point of the graphic window.