Changeset 16 for trunk/private


Ignore:
Timestamp:
08/18/09 14:38:44 (15 years ago)
Author:
pinsard
Message:

script_correc : save figures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/private/script_correc.m

    r14 r16  
    1212% 
    1313% ++ 
     14% 
     15% ``script_correc`` plot ans save several figures : 
    1416%  
     17%  - script_correc_thetas.eps :  
     18% 
     19%  - script_correc_thetav.eps :  
     20% 
     21%  - script_correc_dphi.eps :  
     22% 
     23%  - script_correc_rho_670_.eps :  
     24% 
     25%  - script_correc_rho_765_.eps :  
     26% 
     27%  - script_correc_rho_865_.eps :  
     28% 
     29%  - script_correc_tau.eps :  
     30% 
     31%  - script_correc_diagramme_dispersion.eps : 
     32% 
     33%  - script_correc_histogramme_erreur.eps : 
     34% 
    1535% EXAMPLES 
    1636% ======== 
     
    3959% improve description 
    4060% 
    41 % avoid overriding existing output file 
     61% avoid overriding existing output files 
    4262% 
    4363% make it launchable from everywhere (path and IO directories) 
     
    4565% Running octave, ``more off`` is compulsary but I don't not yet why 
    4666% 
    47 % save output (sdout and figures) to make comparisons possible 
     67% save output (sdout and stderr) to make comparisons possible 
     68% 
     69% If printer is set to png, one might see following warning using octave : 
     70% .. 
     71% 
     72% gdImageStringFT: Could not find/open font while printing string ... with font Helvetica 
     73% 
     74% And no labels are visible on figure outputfiles. 
     75% 
     76% For now, find a portable solution (setting GDFONTPATH) is too tough, so  
     77% printer is set to eps. 
    4878% 
    4979% EVOLUTIONS 
     
    5181% 
    5282% $Id$ 
    53 %  
     83% 
     84% - fplod 2009-08-18T09:55:12Z aedon.locean-ipsl.upmc.fr (Darwin) 
     85% 
     86%   * save figures to make comparisons possible 
     87%   * replace error on suptitle using octave by a warning 
     88% 
    5489% - fplod 2009-08-17T12:39:51Z aedon.locean-ipsl.upmc.fr (Darwin) 
    55 %  
     90% 
    5691%   * add header 
    5792%   * add octave intersect_octave 
     
    106141 
    107142%% QUESTION 3 : rien a faire 
    108   
     143 
    109144%% QUESTION 4 
    110145moy=mean(base_app); 
     
    148183 suptitle(stitle{j}); 
    149184else 
    150  error('eee : octave can not write supertitle'); 
    151 end 
     185 warning('www : octave can not write supertitle'); 
     186end 
     187 
     188% save figure(j) 
     189printer='eps'; 
     190print_printer=['-d', printer]; 
     191% figure name is based on stitle{j}. 
     192% transformation is lower and replace ( and ) by _ 
     193if (run_octave == 0) 
     194 figname=regexprep(lower(stitle{j}), '(', '_'); 
     195else 
     196 figname=regexprep(lower(stitle{j}), '\(', '_'); 
     197end 
     198if (run_octave == 0) 
     199 figname=regexprep(figname, ')', '_'); 
     200else 
     201 figname=regexprep(figname, '\)', '_'); 
     202end 
     203fullfilename=['./', mfilename, '_', figname , '.', printer]; 
     204clear figname; 
     205clear printer; 
     206print(print_printer,fullfilename); 
     207clear print_printer; 
     208clear fullfilename; 
    152209 
    153210end 
     
    173230    [nets(n,i).W1 nets(n,i).W2]=MLPfit(base_val_n(:,1:end-1),base_val_n(:,end),base_app_n(:,1:end-1), ... 
    174231                                       base_app_n(:,end),nets(n,i).W1,nets(n,i).W2,'tah','lin',[1500,1e-6],[100,1]); 
    175          
    176      
     232 
     233 
    177234%QUESTION 6 
    178      
     235 
    179236    %Restitution du reseau 
    180237  tau_nn=MLPval(base_val_n(:,1:end-1),nets(n,i).W1,nets(n,i).W2); 
    181    
     238 
    182239  %Performance du reseau 
    183240  delta=decenred(tau_nn,moy(end),et(end)) - decenred(base_val_n(:,end),moy(end),et(end)); 
    184241  perf_opti=sqrt((1./length(delta))*sum(delta.^2)); 
    185    
     242 
    186243  fprintf(1,'\nRMS finale : %3.2e\n',perf_opti); 
    187244 
     
    193250  xlabel('TAU(vrai)') 
    194251  ylabel('TAU(estime)'); 
    195      
     252 
     253  % save figure 
     254  printer='eps'; 
     255  print_printer=['-d', printer]; 
     256  fullfilename=['./', mfilename, '_diagramme_dispersion', '.', printer]; 
     257  clear printer; 
     258  print(print_printer,fullfilename); 
     259  clear print_printer; 
     260  clear fullfilename; 
     261 
    196262  figure 
    197263  hist(delta,50); 
    198264  xlabel('TAU(estime)-TAU(vrai)'); 
    199265  ylabel('Nombre'); 
     266 
     267  % save figure 
     268  printer='eps'; 
     269  print_printer=['-d', printer]; 
     270  fullfilename=['./', mfilename, '_histogramme_erreur', '.', printer]; 
     271  clear printer; 
     272  print(print_printer,fullfilename); 
     273  clear print_printer; 
     274  clear fullfilename; 
Note: See TracChangeset for help on using the changeset viewer.