AW: [scilab-Users] how to use handle to chane figure size

Paul CARRICO paul.carrico at free.fr
Sat Jul 24 19:42:08 CEST 2010


Finally I think I begin to understand how to proceed :-))))))))))))))

While some aspects are a bit confusing for the moment

Paul


clf(0)
drawlater();
xgrid(3);
f = gcf(); 									// Active le handle "Figure"
//f 										// affiche les parametres de f
f.figure_size = [1000, 1000]; 				// définition de la taille de la figure
f.background = color(245,245,245);			// couleur arrière-plan de la figure
a = gca();									// Active le handle "Axes"
//a											// affiche les propriétés du handle "Axes"
a.font_size = 2;							// taille des chiffres des axes (font_size = enfant de a = "axes")
a.x_label.text = "Epsilon [-]";				// nom axe X (text = enfant de x_label)
a.x_label.font_size = 4;					// definition de la taille des caractères (font_size = enfant de x_label)
a.y_label.text = "Sigma [MPa]";				
a.Y_label.font_size = 4;
a.title.text ="Resultat TRACTION";			// titre de la figure
a.title.font_size = 5;
a.line_style = 1;							// definition du style des axes

plot(TRACTION(:,3),TRACTION(:,4))
e = gce()									// permet d'activer le handle "Entity" c-a-d celui de la courbe tracée
p = e.children								// polyline = children de entiey
p.thickness = 3 ;
//p.line_style = 1;
//p.mark_mode = "on"
//p.mark_style = 4;

drawnow();
xs2jpg(0,'essais_traction.jpg'); // permet d'exporter le graphe dans une image jpg
//clf(0) // permet d'effacer la figure










-----Message d'origine-----
De : Paul CARRICO [mailto:paul.carrico at free.fr] 
Envoyé : samedi 24 juillet 2010 12:48
À : users at lists.scilab.org
Objet : RE: AW: [scilab-Users] how to use handle to chane figure size

Dear all

Of course if works however I would like to have access to the text features (size, policy and so on) => I need to understand the handles "logical" !

In the following text for example, the label are not taken into account in the fig : why ?

Regards

Paul

clf(0)
xgrid(3);
f = gcf(); 							// creation de la figure avec identifiant f
//f 										// affiche les parametres de f
f.figure_size = [1000, 1000]; 			// définition de la taille de la figure
f.background = color(245,245,245);		// couleur arrière-plan de la figure
fc = f.children;
fc.title.text = "Resultat TRACTION";
a = gca();
//a
ac = a.children
ac.x_label = "Epsilon [-]";				// nom axe X
ac.y_label = "Sigma [MPa]";				// nom axe Y
scf(f); 								// permet à la figure f de devenir la figure courante si plusieurs figures
plot(TRACTION(:,3),TRACTION(:,4),thickness=2)
xs2jpg(0,'essais_traction.jpg'); // permet d'exporter le graphe dans une image jpg






-----Message d'origine-----
De : alain [mailto:al.bertho at free.fr] 
Envoyé : vendredi 23 juillet 2010 19:14
À : users at lists.scilab.org
Objet : Re: AW: [scilab-Users] how to use handle to chane figure size

Dear Paul,

You should have a look to the xtitle(title,x_label,y_label)  function...

Alain

paul.carrico at free.fr a écrit :
> All,
>
> thanks for this first examples ...
>
> An additional question regarding title and lables ... indeed in the following handle both tite and label are not supported : how can I proceed ?
>
> f = figure(); 					// creation de la figure avec identifiant f
> f 						// affiche les parametres de f
> f.figure_size = [1000, 1000]; 			// définition de la taille de la figure
> f.background = color(245,245,245);		// couleur arrière-plan de la figure
> f.title.text = "Resultat TRACTION";             // titre
> f.x_label = "Epsilon [-]";			// nom axe X
> f.y_label = "Sigma [MPa]";			// nom axe Y
> scf(f); 					// permet à la figure f de devenir la figure courante si plusieurs figures
> plot(TRACTION(:,3),TRACTION(:,4))
>
> PC
>
>
>
> ----- Mail Original -----
> De: "Johannes Graus" <Johannes-Graus at web.de>
> À: users at lists.scilab.org
> Envoyé: Vendredi 23 Juillet 2010 11h21:54 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
> Objet: AW: [scilab-Users] how to use handle to chane figure size
>
> Hi,
>
> here's an example of how I would set a different figure size. I hope it will help you!
>
>
> mode(0);
> xdel(winsid()) //Close all figures
> clear
> clc
>
> f = figure(); //create figure with handle f
> f //Show parameters of figure object
> f.figure_size = [600, 400]; //change size of figure window
> scf(f); //Choose f as current figure if multiple figure windows are used
> plot(sin(0:.01:2*%pi));
>
>
> Yours,
>
> Johannes
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: paul.carrico at free.fr [mailto:paul.carrico at free.fr] 
> Gesendet: Freitag, 23. Juli 2010 11:00
> An: users at lists.scilab.org
> Betreff: [scilab-Users] how to use handle to chane figure size
>
> All,
>
> Ahhhhhhhhhhhhhh ... i'm spending (and wasting) a lot of time to understand how to use handles to increase the figure size !!!
>
> basically I used until now :
> clf(0)
> xtitle("Resultat TRACTION","epsilon [-]","sigma [MPa]")
> plot(TRACTION(:,3),TRACTION(:,4))
> xs2jpg(0,'essais_traction.jpg');
>
> and after reading the 'help figure_properties' I try several things by I failed each time ..
>
> So can somebody share a part of a code to change this *$+&&%%%:-((((  size ?
>
> Thanks in advance
>
> Paul
>
>
>   




More information about the users mailing list