BIOSCILAB
SCILAB 4.0 PAS-A-PAS
SCILAB 4.0 STEP-BY-STEP

Jacques-Deric Rouault

CNRS / INRIA

Volume 4   LE GRAPHISME
Volume 4   GRAPHISM
4.19 GESTION GRAPHIQUE
4.19
GRAPHIC MANAGEMENT

Version 4.0.19 du 23 Décembre 2005 / Version 4.0.19, December 23th 2005
Scilab 3.1 - Scilab 4.0 /  Windows - Linux

4.18       LES CARACTERISTIQUES GRAPHIQUES  / GRAPHIC CHARACTERISTICS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.20       GESTION DES FENETRES  / MANAGING WINDOWS

4.19.01   Présentation  / Presentation
4.19.10   Function xget (1)
4.19.11   Function xget (2)
4.19.12   Function xget (3)
4.19.13   Mots consacrés  / Devoted words
4.19.20   Procedure xset (1)
4.19.21   Procedure xset (2)
4.19.30   Function get (1)
4.19.31   Function get (2)
4.19.32   Function get (3)
4.19.33   Function get (4)
4.19.40   Procedure set (1)
4.19.41   Procedure set (2)
4.19.42   Procedure set (3)
4.19.43   Procedure set (4)

4.19.01   Présentation  / Presentation



La fonction xget et la procedure xset permettent de lire et d'écrire tous les éléments du contexte graphique.  
The function xget and the procedure xset reads and writes all the elements of the graphic context.

Ces deux procédures viennent de l'ancien mode graphique. En général, dans le nouveau mode graphique, leur usage fait double emploi avec l'acces direct aux champs des handles.  
These two procedures come from the old graphic mode. Generally, in the new graphic mode, their use is redundant with the direct access to the fields of handles.

NB : la fonction xget et la procedure xset , liées à l'ancien graphisme sont en voie d'obsolescence.
Note : the function xget and the procedure xset, link to the old graphism are becoming obsolete.

La fonction get et la procedure set permettent de lire et d'écrire tous les éléments du contexte graphique dans le cadre du nouveau mode graphique.  
The function get and the procedure set reads and writes all the elements of the graphic context in the frame of the new graphic mode.

4.19.10   Function xget (1)

xget (Première forme, First form)

La fonction xget de première forme n'a pas d'argument.  
The function xget of the first form has no argument.

//  Program Spas41910A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.10A");
xget;

Télécharger le fichier / Download the file Spas41910A.sce

La fonction xget de première forme permet de modifier de façon interactive les contextes graphiques liès aux mots consacrés font, mark, thickness, pixmap, use color, colors, alufunction.  
The function xget of the first form modifies in an interactive way the graphic contexts linked to the devoted words font, mark, thickness, pixmap, use color, colors, alufunctions.









4.19.11   Function xget (2)

xget (Seconde forme, Second form)

La fonction xget de seconde forme a comme argument une chaine contenant un mot consacré qui désigne un élément du contexte graphique, et retourne la valeur correspondante du contexte graphique.  
The function xget of the second form has a argument of type string containing a devoted word designing an element of the graphic context, and returns the corresponding value of the graphic context.

//  Program Spas41911A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.11A");
v = xget ("wpos"),

Télécharger le fichier / Download the file Spas41911A.sce



La liste des
mots consacrés est développée à la section 4.19.13.  
The list of the devoted words is developped in the section 4.19.13

4.19.12   Function xget (3)

xget (Troisième forme, Third form)

La fonction xget de troisième forme a deux arguments : une chaine et un entier de valeur 1 qui code le mode bavard.  
The function xget of the third form has two arguments :  a string and an integer of avlue 1 coding the verbous mode .

//  Program Spas41912A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.12A");
v = xget ("wpos", 1),

Télécharger le fichier / Download the file Spas41911A.sce



4.19.13   Mots consacrés  / Devoted words

Devoted words (xget, xset)
Mots consacrés (xget, xset)


Les mots consacrés sont traités dans les sections suivantes :
The devoted words are treated in the following sections:

alufunction           4.21.21   pixel_drawing_mode
auto clear            4.23.28   auto_clear
background         4.21.18   background
clipoff                  4.16.52   xget ("clipping")  xset ("clipping")        xarrows
clipping                4.16.52   xget ("clipping")  xset ("clipping")
color
colormap            
4.18.18   La gestion des palettes  / Managing palettes
                           4.21.17   color_map
dashes                (obsolete)
default (xset)      
4.21.05   La figure par défaut  / The default figure
font
font size
foreground        
4.23.33   foreground
fpf
hidden3d          
4.23.63   hiddencolor
lastpattern          4.18.13   Nouvelles couleurs  / New colors
line mode          4.23.60   line_mode
line style            4.23.61   line_style
mark                  4.23.71   mark_style       4.23.73   mark_size
mark size            4.23.73   mark_size
pattern                (obsolete)
pixmap              
4.21.20   pixmap
pos                     4.21.11   figure_position
thickness             4.23.62   thickness
use color
viewport
wdim                 
4.21.12   figure_size
window              4.21.16   figure_id
wpdim               ?
wpos                
4.21.11   figure_position
wresize              4.21.14   auto_resize
wshow
wwpc

4.19.20   Procedure xset (1)

xset (Première forme, First form)

La procédure xset de première forme n'a pas d'argument.  
The procedure xset of the first form has no argument.

//  Program Spas41920A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.20A");
xset;

Télécharger le fichier / Download the file Spas41920A.sce

La procédure xset de première forme permet de modifier de façon interactive les contextes graphiques liès aux mots consacrés font, mark, thickness, pixmap, use color, colors, alufunction.  
The procedure xset of the first form modifies in an interactive way the graphic contexts linked to the devoted words font, mark, thickness, pixmap, use color, colors, alufunctions.









4.19.21   Procedure xset (2)

xset (Seconde forme, Second form)

La procédure xset de seconde forme a comme argument une chaine contenant un mot consacré qui désigne un élément du contexte graphique, et les nouvelles valeurs correspondantes du contexte graphique.  
The procedure xset of the second form has as arguments of type string containing a devoted word designing an element of the graphic context, and the new corresponding values of the graphic context.

//  Program Spas41921A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.21A");
xset ("wpos", [100,100]),

Télécharger le fichier / Download the file Spas41921A.sce

La liste des
mots consacrés est développée à la section 4.19.13.  
The list of the devoted words is developped in the section 4.19.13

4.19.30   Function get (1)

get (Première forme, First form)

La procédure get de première forme a comme argument un nom de champ du dernier handle créé, et retourne la valeur correspondante. 
The function get of the first form has as argument the name of a field of the last created handle, and returns its value.

//  Program Spas41930A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.30A");
hf = scf (1);
hf.figure_name = "4.19.30A";
xrect (0.1, 0.9, 0.8, 0.8);
coul = get ("foreground"),

Télécharger le fichier / Download the file Spas41930A.sce



L'appel de la fonction get est strictement équivallente à :
The calling of the function get is strictly equivallent to

//  Program Spas41930B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.30B");
hf = scf (1);
hf.figure_name = "4.19.30B";
xrect (0.1, 0.9, 0.8, 0.8);
hr = gce ();
coul = hr.foreground,

Télécharger le fichier / Download the file Spas41930B.sce



4.19.31   Function get (2)

get (Seconde forme, Second form)

La procédure get de seconde forme a comme arguments un handle et un de ses noms de champ, et retourne la valeur correspondante. 
The function get of the second form has as arguments a handle and one of its names of a field, and returns its value.

//  Program Spas41931A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.31A");
hf = scf (1);
hf.figure_name = "4.19.31A";
xrect (0.1, 0.9, 0.8, 0.8);
v = get (hf, "figure_size"),

Télécharger le fichier / Download the file Spas41931A.sce



L'appel de la fonction get est strictement équivallente à :
The calling of the function get is strictly equivallent to

//  Program Spas41931B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.31B");
hf = scf (1);
hf.figure_name = "4.19.31B";
xrect (0.1, 0.9, 0.8, 0.8);
v = hf.figure_size,

Télécharger le fichier / Download the file Spas41931B.sce



4.19.32   Function get (3)

get (Troisième forme, Third form)

La procédure get de troisième forme a comme arguments le rang d'un handle crée par la fonction uicontrol et un de ses noms de champ, et retourne la valeur correspondante. 
The function get of the third form has as arguments the rank of a handle created by the function uicontrol and one of its names of a field, and returns its value.

4.19.33   Function get (4)

get (Quatrième forme, Fourth form)

La procédure get de quatrième forme a comme argument un mot consacré
The function get of the fourth form has as argument a devoted word.

color_map

current_axes

4.23.04   Déclaration  / Declaring

La fonctions gca (ou get ("current_axes") ) retourne le handle Axes.
The function gca (or get ("current_axes") ) returns the handle Axes.

current_figure

default_axes

4.14.03   Handle par défaut  / Default handle
4.23.01   Présentation  / Presentation
La fonction gda (ou get ("default_axes") ) retourne le handle du repère par défaut.
The function gda (or get ("default_axes") ) returns the handles of the default system of axes.

default_figures
4.14.03   Handle par défaut  / Default handle
4.21.05   La figure par défaut  / The default figure

La fonctions gdf (ou get ("default_figure") ) retourne le handle de la fenetre par défaut.
The function gdf (or get ("default_figure") ) returns the handle of default window.

figure_style

4.00.10   Détecter le mode graphique / Detecting the graphic mode
4.20.13   Création d'une fenetre par set  / Creating a window by set

La fonction get ("figure_style") donne le mode courant : l'ancien "old" ou le nouveau "new" (valeur par défaut).
The function get ("figure_style") provides the current mode: the old  "old" or the new "new" (default value) one.

hdl
4.12.03   Déclaration contextuelle  / Contextual declaration
4.20.13   Création d'une fenetre par set  / Creating a window by set

La fonction get ("hdl") retourne le handle du dernier objet graphique créé. La fonction gce est identique à get ("hdl").
The function get ("hdl") retruns the handle of the last created graphic object. The function gce is identical to get ("hdl").

old_style
4.00.10   Détecter le mode graphique / Detecting the graphic mode
La fonction get ("old_style") donne le mode par défaut :  l'ancien "on" ou le nouveau "off" (valeur par défaut)
The function get ("old_style") provides the default mode: the old "on" or the new "off" (default value) one.

4.19.40   Procedure set (1)

set (Première forme, First form)

La procédure set de première forme a comme arguments un nom de champ du dernier handle créé et  la nouvelle valeur correspondante. 
The function set of the first form has as arguments the name of a field of the last created handle, and its new value.

//  Program Spas41940A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.40A");
hf = scf (1);
hf.figure_name = "4.19.40A";
xrect (0.1, 0.9, 0.8, 0.8);
set ("foreground",5);

Télécharger le fichier / Download the file Spas41940A.sce





L'appel de la procédure set est strictement équivallente à :
The calling of the procedure set is strictly equivallent to

//  Program Spas41940B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.40B");
hf = scf (1);
hf.figure_name = "4.19.40B";
xrect (0.1, 0.9, 0.8, 0.8);
hr = gce ();
hr.foreground = 5;

Télécharger le fichier / Download the file Spas41940B.sce



4.19.41   Procedure set (2)

set (Seconde forme, Second form)

La procédure set de seconde forme a comme arguments un handle, un de ses noms de champ, et la nouvelle valeur correspondante. 
The procedure set of the second form has as arguments a handle, one of its names of field, its new value.

//  Program Spas41941A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.41A");
hf = scf (1);
hf.figure_name = "4.19.41A";
xrect (0.1, 0.9, 0.8, 0.8);
set (hf,"figure_size", [300,300]),

Télécharger le fichier / Download the file Spas41941A.sce



L'appel de la procédure set est strictement équivallente à :
The calling of the procedure set is strictly equivallent to

//  Program Spas41941B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.19.41B");
hf = scf (1);
hf.figure_name = "4.19.41B";
xrect (0.1, 0.9, 0.8, 0.8);
hf.figure_size = [300, 300];

Télécharger le fichier / Download the file Spas41941B.sce





4.19.42   Procedure set (3)

set (Troisième forme, Third form)

La procédure set de troisième forme a comme arguments le rang d'un handle crée par la fonction uicontrol, un de ses noms de champ, et la nouvelel valeur correspondante. 
The function set of the third form has as arguments the rank of a handle created by the function uicontrol, one of its names of a field, and its new value.

4.19.43   Procedure set (4)

set (Quatrième forme, Fourth form)

La procédure set de quatrième forme a comme arguments un mot consacré et la nouvelle valeur correspondante
The function set of the fourth form has as arguments a devoted word and its new value.

color_map

current_axes
4.23.04   Déclaration  / Declaring
La fonction gca (ou get ("current_axes") ) retourne le handle Axes.
The function gca (or get ("current_axes") ) returns the handle Axes.

current_figure

default_axes 

4.23.01   Présentation  / Presentation
4.14.04   Rétablir le handle par défaut  / Restoring the default handle

La fonction sda (ou set ("default_axes") ) permet de rétablir la valeur modèle de default_axes.
The function sda (or set ("default_axes") ) restores the model value of default_axes.

default_figure

4.14.04   Rétablir le handle par défaut  / Restoring the default handle
4.21.05   La figure par défaut  / The default figure

La fonction sdf (ou set ("default_figure") ) permet de rétablir la valeur modèle de default_figure
The function sfd (or set ("default_figure") ) restores the model value of default_figure.

figure_style

4.00.10   Détecter le mode graphique / Detecting the graphic mode
4.20.13   Création d'une fenetre par set  / Creating a window by set

La fonction get ("figure_style") donne le mode courant : l'ancien "old" ou le nouveau "new" (valeur par défaut).
The function get ("figure_style") provides the current mode: the old  "old" or the new "new" (default value) one.

hdl
4.20.13   Création d'une fenetre par set  / Creating a window by set


old_style

4.00.10   Détecter le mode graphique / Detecting the graphic mode

La fonction get ("old_style") donne le mode par défaut :  l'ancien "on" ou le nouveau "off" (valeur par défaut)
The function get ("old_style") provides the default mode: the old "on" or the new "off" (default value) one.

4.19.99   Zones d'ombre  / Shadowy areas

set et get de troisième forme, en relation avec uicontrol

Compléter xset et xget avec les différentes options

4.18       LES CARACTERISTIQUES GRAPHIQUES  / GRAPHIC CHARACTERISTICS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.20       GESTION DES FENETRES  / MANAGING WINDOWS