[scilab-Users] legend (plot) & execstr
    paul.carrico at free.fr 
    paul.carrico at free.fr
       
    Mon Nov  8 19:40:12 CET 2010
    
    
  
Samuel,
First of all thanks for your interest/help
Since I don't know exactly how many data files I have, I would like to write the following
nom_fichier1 = "input_data_X.dat";  
nom_fichier2 = "input_data.dat";    
nom_fichier3 = "input_data.dat";   
then in the plot section I have as many curve as input files ...the what I need is :
legend(string(nom_fichier1),string(nom_fichier2),string(nom_fichier3),pos=2)
so I tried to use exestr .. but no legend finally appears ... here is my last attempt that fails !!!
    s6 = " ...
    tmp_legend = [] , ...
        for h = 1 : Nbre_fichiers , ...
            tmp_legend = ""tmp_legend + nom_fichier" + string(h) + " "" + string(ascii(44)) , ...
        end , ...
    , ...
    pos = 2 , ...
    " ;
    legend(execstr(s6))
Paul
----- Mail Original -----
De: "Samuel GOUGEON" <Samuel.Gougeon at univ-lemans.fr>
À: users at lists.scilab.org
Envoyé: Lundi 8 Novembre 2010 19h22:02 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [scilab-Users] legend (plot) & execstr
  Hello,
I am not sure to well understand which result you want, if nom_fichier
is a variable or a litteral, etc.
May be the following would be convenient:
legend(nom_fichier+string(1:Nbre_fichiers),2)
Samuel
    
    
More information about the users
mailing list