Orscilab
ORSCILAB
SCILAB 3.1 PAS-A-PAS
SCILAB 3.1 STEP-TO-STEP

Jacques-Deric Rouault

Laboratoire de Neurobiologie de l'Apprentissage, de la Mémoire et de la Communication. CNRS UMR 8620, Bat. 446, Université Paris-Sud, F91400 Orsay


Volume 4   LE GRAPHISME
Volume 4   GRAPHISM
4.38 LE GRAPHISME 2D
4.38
THE 2D GRAPHISM

Version 3.1.100 du 29 juin 2005 / Version 3.1.100, June 29th 2005
Scilab 3.1.1

4.31       LE HANDLE LEGEND / THE HANDLE LEGEND
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.39       OPTIONS GRAPHIQUES  / GRAPHIC OPTIONS

4.38.01   Présentation  / Presentation
4.38.10  Le zoom  / zooming
4.38.11   Procedure zoom_rect 
4.38.12   Procedure unzoom (P1)
4.38.13   Procedure unzoom (P2)

4.38.01   Présentation  / Presentation

Scilab integre de nombreuses représentations graphiques en 2 dimensions.
Scilab integrates several graphic representations in 2 dimensions.

Les questions liées au point de vue de l'observateur et aux rotations dans l'espace sont traitées au chapitre
4.70       LE GRAPHISME 3D / THE 3D GRAPHISM.
The questions concerning the observer viewpoint and rotations in the 3D space are developped in chapter 4.70       LE GRAPHISME 3D / THE 3D GRAPHISM

4.38.10  Le zoom  / zooming

Zoom
Zooming


Il y a 3 façons différentes d'agir sur le zoom :

There are 3 different ways to act on zooming:

Manuellement, avec l'icone placée dans le coin en haut à gauche de la fenetre graphique. Voir 4.03.20   Zoom / Zoom
Manually, with the icon located at the upper left corner of the graphic window: See 4.03.20   Zoom / Zoom.
.
En modifiant la valeur du handle Axes.zoom_box. Voir 4.23.27   zoom_box.
By modifying the value of handle Axes.zoom_box. See 4.23.27   zoom_box.

En utilisant les procédures zoom_rect et unzoom.

By using the procedures zoom_rect and unzoom.

4.38.11   Procedure zoom_rect 

zoom_rect

La procédure zoom_rect  affectue un zoom sur le rectangle [xinf, yinf, xsup, ysup].

The procedure zoom_rect performs a zoom on the rectangle [xinf, yinf, xsup, ysup].:

disp ("4.38.11A");
hf = scf (1);
hf.figure_name = "4.38.11A1";
ha = hf.children;
ha.axes_visible="on";
xfrect (0.1, 0.9, 0.8, 0.8);
xpause (5000000);

hf.figure_name = "4.38.11A2";
zoom_rect ([-0.1, -0.1, 0.3, 0.2]);
xpause (5000000);
delete (hf);





La procédure zoom_rect ne permet pas de faire des zooms négatifs.

The procedure zoom_rect does not allow to perform negative zooms:

disp ("4.38.11B");
hf = scf (1);
hf.figure_name = "4.38.11B1";
ha = hf.children;
ha.axes_visible="on";
ha.zoom_box,
xfrect (0,1, 1, 1);
xpause (5000000);

hf.figure_name = "4.38.11B2";
zoom_rect ([-10, -1, 10, 2]);
ha.zoom_box,
xpause (5000000);

hf.figure_name = "4.38.11B3";
ha.zoom_box =[-10, -1, 10, 2];
ha.zoom_box,
xpause (5000000);
delete (hf);







La procédure zoom_rect agit directement sur le champ Axes.zoom_box.
The procedure zoom_rect directly acts on the field Axes.zoom_box.

disp ("4.38.11C");
hf = scf (1);
hf.figure_name = "4.38.11C";
ha = hf.children;
zoom_rect ([-0.1, -0.1, 0.3, 0.2]);
ha.zoom_box,
delete (hf);



NB : Il y a  des discordances de valeurs.

NOTE: There is a discordence in the values.

4.38.12   Procedure unzoom (P1)

unzoom (P1)

La procédure unzoom  de première forme rétablit l'échelle d'origine après un zoom.

The procedure unzoom of the first form restaures the original scale after a zoom.

disp ("4.38.12A");
hf = scf (1);
hf.figure_name = "4.38.12A1";
ha = hf.children;
ha.axes_visible="on";
xfrect (0.1, 0.9, 0.8, 0.8);
zoom_rect ([-0.1, -0.1, 0.3, 0.2]);
xpause (5000000);

hf.figure_name = "4.38.12A2";
unzoom ();
xpause (5000000);
delete (hf);





disp ("4.38.12B");
hf = scf (1);
hf.figure_name = "4.38.12B1";
ha = hf.children;
ha.axes_visible="on";
xfrect (0.1, 0.9, 0.8, 0.8);
zoom_rect ([-0.1, -0.1, 0.3, 0.2]);
xpause (5000000);

hf.figure_name = "4.38.12B2";
ha.data_bounds = [-1, -1; 2, 3];
unzoom ();
xpause (5000000);
delete (hf);





Quand la fenetre graphique présente plusieurs systèmes d'axes, la procédure unzoom de première forme rétablit l'échelle d'origine de tous les axes.
When the graphic window presents several systems of axes, the procedure unzoom of the first form restaures all the systems at the original scale.

disp ("4.38.12C");
hf = scf (1);
hf.figure_name = "4.38.12C1";

subplot (2, 2, 1);
ha1 = gca ();
ha1.axes_visible = "on";
ha1.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr1 = gce ();
hr1.foreground = 2;
zoom_rect ([0, 0, 0.2, 0.2]);

subplot (2, 2, 2);
ha2 = gca ();
ha2.axes_visible = "on";
ha2.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr2 = gce ();
hr2.foreground = 3;
zoom_rect ([0.2, 0, 0.4, 0.2]);

subplot (2, 2, 3);
ha3 = gca ();
ha3.axes_visible = "on";
ha3.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr3 = gce ();
hr3.foreground = 4;
zoom_rect ([0, 0.2, 0.2, 0.4]);

subplot (2, 2, 4);
ha4 = gca ();
ha4.axes_visible = "on";
ha4.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr4 = gce ();
hr4.foreground = 5;
zoom_rect ([0.2, 0.2, 0.4, 0.4]);
xpause (5000000);

hf.figure_name = "4.38.12C2";
unzoom ();
xpause (5000000);
delete (hf);





4.38.13   Procedure unzoom (P2)

unzoom (P2)

Quand la fenetre graphique présente plusieurs systèmes d'axes, la procédure unzoom de seconde forme rétablit l'échelle d'origine des systèmes d'axes désignés par leurs handles.
When the graphic window presents several systems of axes, the procedure unzoom of the second form restaures the systems of axes designed by their handles;.

disp ("4.38.13A");
hf = scf (1);
hf.figure_name = "4.38.13A1";

subplot (2, 2, 1);
ha1 = gca ();
ha1.axes_visible = "on";
ha1.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr1 = gce ();
hr1.foreground = 2;
zoom_rect ([0, 0, 0.2, 0.2]);

subplot (2, 2, 2);
ha2 = gca ();
ha2.axes_visible = "on";
ha2.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr2 = gce ();
hr2.foreground = 3;
zoom_rect ([0.2, 0, 0.4, 0.2]);

subplot (2, 2, 3);
ha3 = gca ();
ha3.axes_visible = "on";
ha3.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr3 = gce ();
hr3.foreground = 4;
zoom_rect ([0, 0.2, 0.2, 0.4]);

subplot (2, 2, 4);
ha4 = gca ();
ha4.axes_visible = "on";
ha4.box = "on";
xfrect (0.1, 0.4, 0.2, 0.2);
hr4 = gce ();
hr4.foreground = 5;
zoom_rect ([0.2, 0.2, 0.4, 0.4]);
xpause (5000000);

hf.figure_name = "4.38.13A2";
unzoom (ha2);
xpause (5000000);

hf.figure_name = "4.38.13A3";
unzoom ([ha1, ha4]);
xpause (5000000);
delete (hf);



NB : La procédure unzoom  de seconde forme ne fontionne pas. BUG 1476
The procedure unzoom of the second  form does not work. BUG 1476

4.38.99   Zones d'ombre  / Shadowy areas

NB : La procédure unzoom  de seconde forme ne fontionne pas. BUG 1476

4.31       LE HANDLE LEGEND / THE HANDLE LEGEND
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.39       OPTIONS GRAPHIQUES  / GRAPHIC OPTIONS