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.11   LES VARIABLES GRAPHIQUES
4.11   GRAPHIC VARIABLES
VVersion 4.0.22 du 6 Janvier 2006 / Version 4.0.22, January 6th 2006
Scilab 3.1 - Scilab 4.0 /  Windows - Linux

4.10       GESTION DES FENETRES / MANAGING WINDOWS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.12       DECLARATION DES HANDLES  / DECLARING HANDLES

4.11.01   La notion d'objet graphique  / Notion of graphic object
4.11.02   Le type handle  / The handle type
4.11.03   handle et list  / handle and list
4.11.04   Les catégories de handle  / The categories of handle
4.11.05   Les variables handle  / The variables handle

4.11.01   La notion d'objet graphique  / Notion of graphic object

Graphic variable
Variable graphique


Le nouveau graphisme de Scilab est basé sur la notion de variable graphique.
The new graphism of Scilab is based upon the notion of graphic variable.

Les intructions graphiques de Scilab agissent sur les  variables graphiques (création, modification suppression).

The graphic instructions of Scilabact on the graphic variables (creation, modification deletion).

De façon indépendante, les valeurs des variables graphiques sont traduites et affichées à l'écran.

In an independent way, the values of the graphic variables are translated and displayed at screen.

//  Program Spas41101A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.11.01A");
hf = scf (1);
hf.figure_name = "4.11.01A";
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
xfrect (0.4, 0.6, 0.2, 0.2);
hr = gce ();
hr.background = 5;

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

Le programme 4.11.01A gère 3 variables graphiques : hf (la fenetre graphique), ha (le repère ou système d'axes) et hr (le rectangle rouge).
The program 4.11.01A manages 3 graphic variables: hf (the graphic window), ha (the system of axes) and hr (the red rectangle).





Pour refermer la fenetre graphique, cliquer sur la croix dans le coin supérieur droit.
To close this window, click on the cross at the upper right corner.

4.11.02   Le type handle  / The handle type

handle (Type)
Poignée

Les variables graphiques sont de type 9 ou handle, terme qui peut se traduire par poignée.
The graphic variables are of type 9 or handle.

//  Program Spas41102A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.11.02A");
hf = scf (1);
type (hf),
typeof (hf),
ha = gca ();
type (ha),
typeof (ha),
xfrect (0.4, 0.6, 0.2, 0.2);
hr = gce ();
type (hr),
typeof (hr),

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





NB : Les différentes variables graphiques sont toutes du même type 9 ou handle.
NOTE: The different graphic variables are all of the same type 9 or handle.

4.11.03   handle et list  / handle and list

handle (Type list, List type)

Les types handle sont des types list particuliers.
The handle types are particular list types.

//  Program Spas41103A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.11.03A");
hf = scf (1);
hf,

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







//  Program Spas41103B
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.11.03B");
lines (0);
hf = scf (1);
ha = gca ();
ha,

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





//  Program Spas41103C
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.11.03C");
hf = scf (1);
xfrect (0.4, 0.6, 0.2, 0.2);
hr = gce ();
hr,


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





Comme toutes les listes, les champs des handles sont modifiables, ce qui conditionne la représentation graphique finale.
As all the lists, the fieds of handles can be modified, thus conditionning the final graphic representation.

4.11.04   Les catégories de handle  / The categories of handle

Il existe 21 catégories de handles, avec leurs champs spécifiques :
There are 21 categories of handle, with their specific fields;

Figure (Fenetre graphique, Graphic window).
Axes (Système d'axes, System of axes).
Compound (version 4.0) - Agregation (version 3) (Groupe de handles, Set of handles).

Label (Noms des axes, Names of axes).
Legend (Légende des tracés, Legends of drawings).
Text (Texte, Text).

Polyline (Ligne brisée 2D/3D, 2D/3D broken lines).
Segs (Segment 2D/3D, 2D/3D segment).

Arcs (Arc d'ellipse 2D, 2D arc of ellipse).
Axis (Axe 2D, 2D axis).
Rectangle (Rectangle 2D, 2D rectangle).

Champ (Surface 2D, 2D surface).
Fec (Surface 2D, 2D surface).
Grayplot (Surface 2D, 2D surface).
Matplot (Surface 2D, 2D surface).

Plot3d (Surface 3D, 3D surface).
Fac3d (Surface 3D, 3D surface).

Uimenu

Les types suivants de handles sont obsoletes :
The following types of handle are obsoletes:

Param3d (Surface 3D, 3D surface).
Patch
Title
 
(voir, see Legend)

Les types suivants de handles sont cachés :
The following types of handle are hidden:

Merge (Surface 3D, 3D surface).

Les dénominations suivantes ne sont pas des handles :

The following callings are not handles:

Surface (voir, see Plot3d et Fac3d)

4.11.05   Les variables handle  / The variables handle

Dans le but de d'accroitre la lisibilité des programmes Scilab, nous avons choisi pour chacun des 21 types de handle des identificateur de variables construits sous la forme h plus une lettre.
In the aim of increasing the readabilty of Scilab programs, for each of the 21 types of handle, variable identifiers are built under the form of a letter h followed by a letter.

ha   Axes
hb   Labels
hc   Arc
hd   Legend
he   Fec
hf    Figure
hh   Champ
hm   Matplot
hn   Compound
hp   Polyline
hr   Rectangle
hs   Segs
ht   Text
hu   Fac3d
hx   Axis
hy   Grayplot
hz   Plot3d

Si un programme contient plusieurs variables du même types, elles seront numérotées : ha1, ha2, ha3, ...

If a program contains several variables of the same type, they will receive a number: ha1, ha2, ha3, ...

4.10       GESTION DES FENETRES / MANAGING WINDOWS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.12       DECLARATION DES HANDLES  / DECLARING HANDLES