![]() 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.18
LES
CARACTERISTIQUES GRAPHIQUES 4.18 GRAPHIC CHARACTERISTICS |
Version 4.0.23 du 9 Janvier 2006 / Version 4.0.23, January 9th 2006 |
Scilab 3.1 - Scilab 4.0 / Windows - Linux |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.19 GESTION GRAPHIQUE / GRAPHIC MANAGEMENT |
4.18.01
Principe / Principle |
4.18.02
L'ancien style couleur/marque / The old style color/mark |
4.18.10
La couleur / Color |
Color
(Graphic) Couleur (Graphique) RGB |
// Program Spas41810A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.10A"); hf = scf (1); hf.figure_name = "4.18.10A"; hf.background=5; // rouge red |
4.18.11
La palette par défaut / The default palette |
default palette getcolor palette par défaut lastpattern (xget) xget ("lastpattern") |
// Program Spas41811A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.11A"); c = getcolor (), |
// Program Spas41811B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.11B"); hf = scf (1); hf.figure_name = "4.18.11A"; nc = size(hf.color_map,1), |
// Program Spas41811C
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.11C"); hf = scf (1); hf.figure_name = "4.18.11C"; ha = gca (); ha.background = 5; xrect ([0.1; 0.3; 0.2; 0.2]); hr1 = gce (); hr1.background = 0; hr1.fill_mode = "on"; xrect ([0.4; 0.6; 0.2; 0.2]); hr2 = gce (); hr2.background = -1; hr2.fill_mode = "on"; xrect ([0.7; 0.9; 0.2; 0.2]); hr3 = gce (); hr3.background = -2; hr3.fill_mode = "on"; |
// Program Spas41811D
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.11D"); hf = scf (1); ncoul = xget ("lastpattern"), delete (hf); |
4.18.12
Le code RGB / The RGB code |
Color (Internal,
external RGB code) Couleur (codage RGB externe, interne) RGB |
Rang / Rank |
R |
G |
B |
Nom / Name |
1 |
0 |
0 |
0 |
black |
2 |
0 |
0 |
255 |
blue |
3 |
0 |
255 |
0 |
green |
4 |
0 |
255 |
255 |
cyan |
5 |
255 |
0 |
0 |
red |
6 |
255 |
0 |
255 |
magenta |
7 |
255 |
255 |
0 |
yellow |
8 |
255 |
255 |
255 |
white |
9 |
0 |
0 |
144 |
scilab blue4 |
10 |
0 |
0 |
176 |
scilab blue3 |
11 |
0 |
0 |
208 |
scilab blue2 |
12 |
135 |
206 |
255 |
skyblue1 |
13 |
0 |
144 |
0 |
scilab green4 |
14 |
0 |
176 |
0 |
scilab green3 |
15 |
0 |
208 |
0 |
scilab green2 |
16 |
0 |
144 |
144 |
scilab cyan4 |
17 |
0 |
176 |
176 |
scilab cyan3 |
18 |
0 |
208 |
208 |
scilab cyan2 |
19 |
144 |
0 |
0 |
scilab red4 |
20 |
176 |
0 |
0 |
scilab red3 |
21 |
208 |
0 |
0 |
scilab red2 |
22 |
144 |
144 |
0 |
scilab magenta4 |
23 |
176 |
176 |
0 |
scilab magenta3 |
24 |
208 |
208 |
0 |
scilab magenta2 |
25 |
128 |
48 |
0 |
scilab brown4 |
26 |
160 |
64 |
0 |
scilab brown3 |
27 |
192 |
96 |
0 |
scilab brown2 |
28 |
255 |
128 |
128 |
scilab pink4 |
29 |
255 |
160 |
160 |
scilab pink3 |
30 |
255 |
192 |
192 |
scilab pink2 |
31 |
255 |
224 |
244 |
scilab pink |
32 |
255 |
215 |
0 |
gold |
// Program Spas41812A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.12A"); lines (0); hf = scf (1); hf.color_map, delete (hf); |
4.18.13
Nouvelles couleurs / New colors |
addcolor color (Valeur RGB, RGB value) |
// Program Spas41813A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.13A"); hf = scf (1); c = color (255, 128, 128), delete (hf); |
// Program Spas41813B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.13B"); hf = scf (1); c1 = color (200, 200, 200), c2 = getcolor (); delete (hf); |
// Program Spas41813C
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.13C"); hf = scf (1); rang = addcolor ([0.5, 0.5, 0.5]), coul = getcolor (); delete (hf); |
4.18.14
Couleurs
prédéfinies /
Predefined colors |
color (Nom, Name) name2rgb rgb2name |
// Program Spas41814A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.14A"); hf = scf (1); c = color ("scilab cyan2"), delete (hf); |
// Program Spas41814B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.14B"); rgb = name2rgb ("scilab cyan2"), |
// Program Spas41814C
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.14C"); coul = rgb2name ([0, 208, 208]), |
// Program Spas41814D
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.14D"); for r=0:255 do for g=0:255 do for b=0:255 do coul = rgb2name ([r, g, b]); if coul<>[] then printf ("r = %3d, g = %3d, b = %3d, %s\n",r,g,b,coul(1)); end; end; end; end; |
4.18.15
La palette hotcolormap / The palette hotcolormap |
hotcolormap |
// Program Spas41815A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.15A"); hf = scf (1); cmap = hotcolormap (64); hf.color_map = cmap; c = getcolor (); delete (hf); |
4.18.16
La palette graycolormap / The palette graycolormap |
graycolormap |
// Program Spas41816A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.16A"); hf = scf (1); cmap = graycolormap (64); hf.color_map = cmap; c = getcolor (); delete (hf); |
4.18.17
La palette jetcolormap / The palette jetcolormap |
jetcolormap |
// Program Spas41817A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.17A"); hf = scf (1); cmap = jetcolormap (100); hf.color_map = cmap; c = getcolor (); delete (hf); |
4.18.18
La palette hsvcolormap / The palette hsvcolormap |
hsvcolormap |
// Program Spas41818A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.18A"); hf = scf (1); cmap = hsvcolormap (100); hf.color_map = cmap; c = getcolor (); delete (hf); |
4.18.20
La gestion des palettes / Managing palettes |
colormap (xget) colormap (xset) color_map (get) get ("color_map") xget ("colormap") xset ("colormap") |
// Program Spas41820A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.20A"); hf = scf (1); cmap = jetcolormap (100); xset ("colormap",cmap); c = getcolor (); delete (hf); |
// Program Spas41820B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.20B"); hf = scf (1); cmap = xget ("colormap"), delete (hf); |
// Program Spas41820C
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.20C"); hf = scf (1); cmap = jetcolormap (100); xset ("colormap",cmap); hf = scf (1); c = getcolor (); hf.color_map=get (sdf(),"color_map"); c = getcolor (); delete (hf); |
4.18.30
Le trait / Lines |
Line
(Graphic) Trait (Graphique) |
// Program Spas41830A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.30A"); hf = scf (1); hf.figure_name = "4.18.30A"; ha = gca (); ha.line_style=5; ha.thickness=3; ha.foreground=5; xrect (0, 1, 1, 1); |
4.18.31
Le type de trait / Line style |
getlinestyle |
// Program Spas41831A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.31A"); t = getlinestyle (), |
// Program Spas41831B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.31B"); hf = scf (1); hf.figure_name = "4.18.31B"; xrect (0, 1, 1, 1); hr1 = gce (); hr1.line_style = 0; xrect (0, 1, 0.9, 0.9); hr2 = gce (); hr2.line_style = 1; xrect (0, 1, 0.8, 0.8); hr3 = gce (); hr3.line_style = 2; xrect (0, 1, 0.7, 0.7); hr4 = gce (); hr4.line_style = 3; xrect (0, 1, 0.6, 0.6); hr5 = gce (); hr5.line_style = 4; xrect (0, 1, 0.5, 0.5); hr6 = gce (); hr6.line_style = 5; xrect (0, 1, 0.4, 0.4); hr7 = gce (); hr7.line_style = 6; xrect (0, 1, 0.3, 0.3); hr8 = gce (); hr8.line_style = 7; xrect (0, 1, 0.2, 0.2); hr9 = gce (); hr9.line_style = 8; xrect (0, 1, 0.1, 0.1); hr10 = gce (); hr10.line_style = 9; |
4.18.32
L'épaisseur de trait / Line thickness |
Epaisseur (trait) Thickness (line) |
// Program Spas41832A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.32A"); hf = scf (1); hf.figure_name = "4.18.32A"; xrect (0, 1, 1, 1); hr1 = gce (); hr1.thickness = 1; xrect (0, 1, 0.9, 0.9); hr2 = gce (); hr2.thickness = 2; xrect (0, 1, 0.8, 0.8); hr3 = gce (); hr3.thickness = 3; xrect (0, 1, 0.7, 0.7); hr4 = gce (); hr4.thickness = 4; xrect (0, 1, 0.6, 0.6); hr5 = gce (); hr5.thickness = 5; xrect (0, 1, 0.5, 0.5); hr6 = gce (); hr6.thickness = 6; xrect (0, 1, 0.4, 0.4); hr7 = gce (); hr7.thickness = 7; xrect (0, 1, 0.3, 0.3); hr8 = gce (); hr8.thickness = 8; xrect (0, 1, 0.2, 0.2); hr9 = gce (); hr9.thickness = 9; xrect (0, 1, 0.1, 0.1); hr10 = gce (); hr10.thickness = 10; |
4.18.40
Les marques / Marks |
Mark
(Graphic) Marque (Graphique) |
// Program Spas41840A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.40A"); hf = scf (1); hf.figure_name = "4.18.40A"; ha = gca (); xrect (0, 1, 1, 1); hr = get ("hdl"); hr.mark_mode="on"; hr.mark_style = 9; hr.mark_size = 5; hr.mark_foreground = 6; hr.mark_background = 7; |
4.18.41
Le mode mark_mode / The mode mark_mode |
mark_mode
(Graphique, Graphic) |
4.18.42
Les types de marque / Mark style |
getmark getsymbol mark_style (Graphique, Graphic) |
// Program Spas41842A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.42A"); t = getmark (), |
// Program Spas41842B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.42B"); hf = scf (1); t = getsymbol (), delete (hf); |
// Program Spas41842C
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.42C"); hf = scf (1); hf.figure_name = "4.18.42C"; ha = gca (); ha.axes_visible = "on"; ha.box = "on"; ha.data_bounds = [0, 20, 0, 20]; ha.mark_size = 3; xrect (0, 20, 19, 19); hr1 = gce (); hr1.mark_style = 0; xrect (0, 20, 18, 18); hr2 = gce (); hr2.mark_style = 1; xrect (0, 20, 17, 17); hr3 = gce (); hr3.mark_style = 2; xrect (0, 20, 16, 16); hr4 = gce (); hr4.mark_style = 3; xrect (0, 20, 15, 15); hr5 = gce (); hr5.mark_style = 4; xrect (0, 20, 14, 14); hr6 = gce (); hr6.mark_style = 5; xrect (0, 20, 13, 13); hr7 = gce (); hr7.mark_style = 6; xrect (0, 20, 12, 12); hr8 = gce (); hr8.mark_style = 7; xrect (0, 20, 11, 11); hr9 = gce (); hr9.mark_style = 8; xrect (0, 20, 10, 10); hr4 = gce (); hr4.mark_style = 9; xrect (0, 20, 9, 9); hr5 = gce (); hr5.mark_style = 10; xrect (0, 20, 8, 8); hr6 = gce (); hr6.mark_style = 11; xrect (0, 20, 7, 7); hr7 = gce (); hr7.mark_style = 12; xrect (0, 20, 6, 6); hr8 = gce (); hr8.mark_style = 13; xrect (0, 20, 5, 5); hr9 = gce (); hr9.mark_style = 14; xrect (0, 20, 4, 4); hr10 = gce (); hr10.mark_style = 15; xrect (0, 20, 3, 3); hr10 = gce (); hr10.mark_style = 16; xrect (0, 20, 2, 2); hr10 = gce (); hr10.mark_style = 17; |
4.18.43
Le controle de la taille / Controling size |
mark_size_unit
(Graphique, Graphic) |
4.18.50
Les textes graphiques / Graphic texts |
Texts
(Graphic) Textes (Graphique) |
// Program Spas41850A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.50A"); hf = scf (1); hf.figure_name = "4.18.50A"; xstring (0.5,0.6,"Scilab"); t = get ("hdl"); t.font_foreground = 5; t.font_size = 5; t.font_style = 5; |
4.18.51
La police / Font |
Font
(Graphic text) getfont Police (Texte graphique) |
// Program Spas41851A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.18.51A"); v = getfont (), |
4.18.98
Mon point de vue /
My viewpoint |
4.18.99
Zones d'ombre /
Shadowy areas |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.19 GESTION GRAPHIQUE / GRAPHIC MANAGEMENT |