Volume
4
LE GRAPHISME
Volume 4 GRAPHISM |
4.00
LE GRAPHISME SCILAB
4.00 SCILAB GRAPHISM
|
Version 4.0.19 du 23 Décembre
2005
/ Version 4.0.19, December 23th 2005
|
Scilab 3.1.1 - Scilab 4.0 - Windows
|
4.00.01 Présentation / Presentation
|
Scilab présente une
librairie graphique élaborée et très
complète. La contrepartie réside dans la
complexité de sa mise en oeuvre par les utilisateurs.
Scilab
presents a very laborated and complete graphic library. The
counterpart lies in the complexity of its application by users.
L'un des avantages
du graphisme Scilab est sa totale portabilité sous les
différents sytèmes d'exploitation : Windows, Linux/Unix,
Mac Os ...
One
of the main avantages of the Scilab
graphism is its portability under different operation systems :
Windows, Linux/Unix, Mac Os , ...
4.00.02 Versions / Versions
|
Il existe plusieurs
versions de la bibliothèque graphique :
There
are several versions of the graphic library:
1) Une version très ancienne,
avec des
procédures telles que plot_old_version
ou plot2d1 qui sont à
présent obsolètes :
1)
An ancient version, with procedures such as plot_old_version or plot2d1 which today
are obsolete.
2) La version de Scilab 2.7, dite
ancien mode graphique.
2)
The version of Scilab 2.7, called old graphic mode.
L'ancien
mode graphique fonctionne séquentiellement. Les objets et les
commandes graphiques sont mémorisées dans une liste
chronologique. Cela signifie que la modification de la fenetre provoque
une réinterprétation totale de tous les ordres graphiques
antérieurs.
The
old graphic mode works sequencially. The graphic objects and commands
are memorized in a chronological list. This means that changing the
window causes a whole reinterpretation of the previous graphic commands.
3) Depuis Scilab 3.0, le
graphisme a été totalement
reécrit (nouveau mode graphique) et a beaucoup gagné en
rapidité et en
interactivité.
3) With
Scilab 3.0, the graphism has been totally rewritten (new graphic mode)
and makes many
progresses in rapidity and interactivity.
Dans
le nouveau
mode graphique, les objets graphiques sont mémorisés avec
leurs propriétés selon une arborescence de handles. De
nombreuses commandes graphiques correspondent à une modification
des propriétés des handles.
In
the new graphic mode, the graphic objects are memorized with their
properties according a tree of handles. Many graphic commands
correspond to a change in the properties of the handles.
Nous nous consacrerons uniquement
au nouveau mode graphique sous Scilab 3.1.1 et 4.0.
This
text is exclusively devoted to the new graphic mode under
Scilab 3.1.1 and 4.0.
Dans les versions 3.1.1 et 4.0, le
graphisme
est par défaut le nouveau mode
graphique. Nous ne forcerons donc pas celui-ci par set
("old_style","off"); (conseillé si on
utilise l'un ou l'autre
mode).
In
the versions 3.1.1 and 4.0, the graphism is the new graphic mode by default. We
do not force it by set
("old_style","off"); (recommended
if the two modes are used).
4.00.03 Compatibilités / Compatibilities
|
Sous Scilab 3.0, 3.1, 3.1.1 et 4.0 la
cohabitation
des deux versions est de nature à poser des problèmes :
Under
Scilab 3.0, 3.1, 3.1.1 and 4.0 the living together of the two versions can be a
source of
problems:
1) Il y a les
nouvelles instructions de
la nouvelle version qui n'existaient pas dans la version ancienne.
1)
There are the new instructions of the new version that did not exist in
the old version.
2) Il y a les
instructions de la version ancienne qui sont reprises dans la
nouvelle version, certaines avec une syntaxe ou une action
différente.
2)
There are the instructions of the old version that are supported by the
new version, some ones with a different syntax or action.
3) Il y a des
instructions de la version ancienne qui ne sont pas reprises dans la
nouvelle version :
3)
There are some instructions of the old version that are not supported
by
the new version :
3a) Certaines instructions
continuent à fonctionner correctement
3a)
Some instructions always work correctly
3b) Certaines instructions
ne fonctionnent plus correctement ou ne sont plus reconnues.
3b)
Some instructions do not work correctly or are not recognized.
3c) Quelques instructions
provoquent une erreur majeure dans
l'exécution du programme.
3c)
Some instructions cause a major error in the program running.
4.00.05 Fonctions et procédures
incompatibles / Incompatibility functions and procedures
|
Avec le nouveau mode
graphique, les noms des procédures et fonctions ont
changé, même si les anciens noms des procédures et
fonctions de l'ancien graphisme continuent provisoirement à
être reconnues dans le nouveau mode
graphique.
With
the new graphic mode, the names of procedures and functions changed,
even if old names of procedures and functions of the old graphism are
provisionnally recognized in the new graphic mode.
Par exemple les procédures xbasc et xclear de l'ancien graphisme deviennent la procédure clf du nouveau graphisme, et la procédures xdel de l'ancien graphisme deviennent la procédure delete du nouveau graphisme.
For instance, the procedures xbasc and xclear of the old graphism begin the procedure clf of the new graphism, and the procedures xdel of the old graphism begin the procedure delete of the new graphism,
4.00.10 Détecter le mode graphique / Detecting the graphic mode
|
Scilab est compatible avec les deux
modes graphiques. Par défaut Scilab 4.0 fonctionne avec le
nouveau mode graphique.
Scilab
is compatible with the two graphic modes. By default, Scilab 4.0
works with the new graphic mode.
Deux variables permettent de controler
le mode graphique : old_style
définit le mode par défaut et figure_style
définit le mode en cours.
Two
variables give the control of the graphic mode: old_style defines the default mode
and figure_style
defines the current 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.
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.
// Program Spas40010A
// Designed for Scilab 3.1.1 & 4.0
// Copyright Jacques-Deric Rouault, CNRS, INRIA
disp ("4.00.10A");
get ("old_style"),
get ("figure_style"),
|
Télécharger le fichier / Download the file Spas40010A.sce
4.00.11 L'ancien mode graphique / The old graphic mode
|
La procédure set ("old_style","on") permet de
forcer le mode par défaut à l'ancien mode. La prochaine fenetre crée
sera gérée avec l'ancien mode graphique.
The
procedure set ("old_style","on")
forces the default mode to the old
mode. The next created window will be managed with the old
graphic mode.
// Program Spas40011A
// Designed for Scilab 3.1.1 & 4.0
// Copyright Jacques-Deric Rouault, CNRS, INRIA
disp
("4.00.11A");
set ("old_style","on");
hh1 = scf (1),
get ("old_style"),
get ("figure_style"),
|
Télécharger le fichier / Download the file Spas40011A.sce

Une fenetre graphique crée
dans l'ancien mode graphique se caractérise par son nom par
défaut ScilabGraphic1,
sa grande taille par défaut (1200*854 pixels) et son
handle de type entier.
A
graphic window created in the old graphic mode is charactized by
its default name ScilabGraphic1,
its wide default size (1200*854 pixels) and its handle of integer type.
4.00.12 Le nouveau mode graphique / The new graphic mode
|
La procédure set ("old_style","off") permet de
forcer le mode par défaut au nouveau mode. La prochaine fenetre crée
sera gérée avec le nouveau mode graphique.
The
procedure set ("old_style","off")
forces the default mode to the new
mode. The next created window will be managed with the new
graphic mode.
disp
("4.00.12A");
set ("old_style","off");
hh1 = scf (1),
get ("old_style"),
get ("figure_style"),
|
Télécharger le fichier / Download the file Spas40012A.sce


Une fenetre graphique crée dans le nouveau mode graphique se
caractérise par son nom par défaut Scilab Graphic (1), sa petite
taille par défaut
(618*535 pixels) et son handle de type Figure.
A
graphic window created in the new graphic mode is charactized by
its default name Scilab Graphic (1),
its wide default size (618*535 pixels) and its handle of type Figure.

4.00.13 Changer le mode graphique / Changing the graphic mode
|
La procédure set
("figure_style") permet de changer le mode graphique en cours ("old" ou "new").
The
procedure set ("figure_style")
changes the current mode ("old"
or "new").
La fenetre est crée dans le
nouveau mode graphique puis est basculée dans l'ancien mode
graphique. Le nom et la taille de la fenetre graphique sont
inchangés.
The
window is created in the new graphic mode, then is switched in the old
mode. The name and the size of the graphic window are not changed.
// Program Spas40013A
// Designed for Scilab 3.1.1 & 4.0
// Copyright Jacques-Deric Rouault, CNRS, INRIA
disp
("4.00.13A");
set ("old_style","off");
hf = scf (1);
xfrect (0.4, 0.6, 0.2, 0.2);
get ("old_style"),
get ("figure_style"),
xpause (5000000);
set ("figure_style","old");
get ("old_style"),
get ("figure_style"),
|
Télécharger le fichier / Download the file Spas40013A.sce


Les objets tracés sont
perdus quand on change de mode graphique.
The
objects drawn are lost when changing the graphic mode.



La fenetre est crée dans l'ancien mode graphique puis est
basculée dans le
nouveau mode graphique. Le nom et la taille de la fenetre
graphique sont modifiés.
The
window is created in the old
graphic mode, then is switched in the
new mode.
The name and the size of the graphic window are modified.
// Program Spas40013B
// Designed for Scilab 3.1.1 & 4.0
// Copyright Jacques-Deric Rouault, CNRS, INRIA
disp
("4.00.13B");
set ("old_style","on");
hf = scf (1);
xfrect (0.4, 0.6, 0.2, 0.2);
get ("old_style"),
get ("figure_style"),
xpause (5000000);
set ("figure_style","new");
get ("old_style"),
get ("figure_style"),
set ("old_style","off");
|
Télécharger le fichier / Download the file Spas40013B.sce
Les objets tracés sont
perdus quand on change de mode graphique.
The
objects drawn are lost when changing the graphic mode..

4.00.98
Mon point de vue /
My viewpoint
|
Travailler uniquement avec le
nouveau mode graphique, plus puissant et plus rapide. L'ancien mode
graphique sera progressivement abandonné.
Only
work with the new graphic mode, more powerfull and rapid.. The old
graphic mode will be progressively leaved.