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

Francis Drossaert Francis.Drossaert at pgs.com
Fri Jul 23 15:57:24 CEST 2010


The figure handle deals with general outlay of the figure and often is referred as the parent. Another handle is called the axes handle which is a child of the figure parent. The title and labels and the most information regarding your plot can be found there.

You can access it through the parent like this:

f.children(1)                      // to view the child of parent handle f.
f.children(1).title = "new name";  // change the title entity of first child of parent handle f.

Note that the (1) refers to number of children. Subplots typically have one parent and multiple children axes entities, although you could move them in one child entity, but let us not go there.

or my preferred method is to create an axes handle:

ahdl = gca()                       // get current axes handle (similar like gcf() )
ahdl.title = "new name"            // change the title
ahdl.font_size = 3                 // change the font size
etc.

Cheers,

Francis



-----Original Message-----
From: paul.carrico at free.fr [mailto:paul.carrico at free.fr] 
Sent: 23 July 2010 14:41
To: users at lists.scilab.org
Subject: Re: AW: [scilab-Users] how to use handle to chane figure size

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


This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.


More information about the users mailing list