Commit 543b4040 authored by Marco Ratto's avatar Marco Ratto
Browse files

Fixed inconsistent behavior of GSA plots w.r.t. nodisplay option.

parent bfa3ecbe
......@@ -310,9 +310,6 @@ else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnprior',int2str(ifig) ],options_);
end
end
if ~options_.nodisplay
close(hh);
end
end
end
ifig=0;
......@@ -341,9 +338,6 @@ else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnlik',int2str(ifig) ],options_);
end
end
if ~options_.nodisplay
close(hh);
end
end
end
ifig=0;
......@@ -372,9 +366,6 @@ else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnpost',int2str(ifig)],options_);
end
end
if ~options_.nodisplay
close(hh);
end
end
end
end
......@@ -524,7 +515,6 @@ else
end
end
end
close all
end
for j=1:size(SP,2),
......
......@@ -100,9 +100,6 @@ if opt_gsa.load_ident_files==0,
title(M_.exo_names(j,:),'interpreter','none')
if mod(j,6)==0 | j==M_.exo_nbr,
dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_vdec_exo_',int2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
end
......@@ -226,9 +223,6 @@ if opt_gsa.morris==1,
xlabel(' ')
title('All variance decomposition')
dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morris_vdec'],options_);
if ~options_.nodisplay
close(hh);
end
else
save([OutputDirectoryName,'/',fname_,'_morris_IDE'],'vdec')
......@@ -745,9 +739,6 @@ if opt_gsa.morris==1,
xlabel(' ')
title('\mu in the model')
dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morrismu_par'],options_);
if ~options_.nodisplay
close(hh);
end
hh=dyn_figure(options_); %bar(SAsignorm(:,irel))
% boxplot(SAsignorm','whis',10,'symbol','r.')
......@@ -763,9 +754,6 @@ if opt_gsa.morris==1,
xlabel(' ')
title('\sigma in the model')
dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morrissig_par'],options_);
if ~options_.nodisplay
close(hh);
end
% figure, bar(SAnorm(:,irel)')
% set(gca,'xtick',[1:j0])
......
......@@ -141,9 +141,6 @@ for j=1:size(anamendo,1)
if ~options_.nograph,
hf=dyn_figure(options_); hist(y0,30), title([namendo,' vs. ', namexo])
dyn_saveas(hf,[xdir,'/', namendo,'_vs_', namexo],options_);
if ~options_.nodisplay
close(hf);
end
end
% if ~isempty(iy),
% si(:,js) = redform_private(x0(iy,:), y0(iy), pshape, pd, iload, pnames, namendo, namexo, xdir, options_gsa_);
......@@ -198,9 +195,6 @@ for j=1:size(anamendo,1)
title([logflag,' ',namendo,' vs. ',namexo],'interpreter','none')
if iplo==9,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
if ~options_.nodisplay
close(hfig);
end
end
end
......@@ -209,9 +203,6 @@ for j=1:size(anamendo,1)
end
if iplo<9 && iplo>0 && ifig && ~options_.nograph,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
if ~options_.nodisplay
close(hfig);
end
end
ifig=0;
iplo=0;
......@@ -252,9 +243,6 @@ for j=1:size(anamendo,1)
if ~options_.nograph,
hf=dyn_figure(options_); hist(y0,30), title([namendo,' vs. ', namlagendo])
dyn_saveas(hf,[xdir,'/', namendo,'_vs_', namlagendo],options_);
if ~options_.nodisplay
close(hf);
end
end
if ~isempty(iy) && ~isempty(iyc),
delete([xdir, '/*cut*.*'])
......@@ -305,9 +293,6 @@ for j=1:size(anamendo,1)
title([logflag,' ',namendo,' vs. ',namlagendo,'(-1)'],'interpreter','none')
if iplo==9,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
if ~options_.nodisplay
close(hfig);
end
end
end
......@@ -316,9 +301,6 @@ for j=1:size(anamendo,1)
end
if iplo<9 && iplo>0 && ifig && ~options_.nograph,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
if ~options_.nodisplay
close(hfig);
end
end
end
......@@ -378,9 +360,6 @@ if iload==0,
if ~options_.nograph,
hfig=dyn_figure(options_); hist(y0,30), title([namy,' vs. ', namx])
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx],options_);
if ~options_.nodisplay
close(hfig);
end
end
% gsa_ = gsa_sdp_dyn(y0, x0, -2, [],[],[],1,fname, pnames);
nrun=length(y0);
......@@ -396,7 +375,9 @@ if iload==0,
gsa_.x0=x00(1:nfit,:);
if ~options_.nograph,
hfig=gsa_sdp_plot(gsa_,fname,pnames,iii(1:min(12,np)));
close(hfig);
if options_.nodisplay
close(hfig);
end
end
gsa_.x0=x0(1:nfit,:);
% copyfile([fname,'_est.mat'],[fname,'.mat'])
......@@ -405,9 +386,6 @@ if iload==0,
plot(y0(1:nfit),[gsa_.fit y0(1:nfit)],'.'),
title([namy,' vs. ', namx,' fit'])
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_fit'],options_);
if ~options_.nodisplay
close(hfig);
end
if nfit<nrun,
npred=[nfit+1:nrun];
yf = ss_anova_fcast(x0(npred,:), gsa_);
......@@ -415,9 +393,6 @@ if iload==0,
plot(y0(npred),[yf y0(npred)],'.'),
title([namy,' vs. ', namx,' pred'])
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_pred'],options_);
if ~options_.nodisplay
close(hfig);
end
end
end
......@@ -430,9 +405,6 @@ else
plot(y0,[yf y0],'.'),
title([namy,' vs. ', namx,' pred'])
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_pred'],options_);
if ~options_.nodisplay
close(hfig);
end
end
end
% si = gsa_.multivariate.si;
......
......@@ -91,9 +91,6 @@ for j=1:size(anamendo,1),
title([namendo,' vs. ',namexo],'interpreter','none')
if iplo==9,
dyn_saveas(hh,[dirname,'/',M_.fname,'_', namendo,'_vs_shock_',num2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
......@@ -101,9 +98,6 @@ for j=1:size(anamendo,1),
end
if iplo<9 && iplo>0 && ifig,
dyn_saveas(hh,[dirname,'/',M_.fname,'_', namendo,'_vs_shocks_',num2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
iplo=0;
......@@ -138,9 +132,6 @@ for j=1:size(anamendo,1),
title([namendo,' vs. ',namlagendo,'(-1)'],'interpreter','none')
if iplo==9,
dyn_saveas(hh,[dirname,'/',M_.fname,'_', namendo,'_vs_lags_',num2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
end
......
......@@ -98,8 +98,5 @@ for i=1:ceil(nparplot/12),
title([ftit{j},'. p-value ', num2str(proba(ipar(j)),2)],'interpreter','none')
end
dyn_saveas(hh,[dirname,'/',fname_,'_',aname,'_SA_',int2str(i)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
......@@ -110,9 +110,6 @@ for j=1:npar,
title(['cc = ',num2str(c0(i2(jx),j))])
if (mod(j2,12)==0) && j2>0,
dyn_saveas(hh,[dirname,'/',fig_nam_,int2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
end
......@@ -121,9 +118,6 @@ for j=1:npar,
end
if ~options_.nograph && (j==(npar)) && j2>0 && (mod(j2,12)~=0),
dyn_saveas(hh,[dirname,'/',fig_nam_,int2str(ifig)],options_);
if ~options_.nodisplay
close(hh);
end
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment