diff --git a/matlab/PlotPosteriorDistributions.m b/matlab/PlotPosteriorDistributions.m index 2ae1837931c318e5fb766be59abb3d0b7bf3e5c5..234b180386cffabd199fd94076f1ab2558272d47 100644 --- a/matlab/PlotPosteriorDistributions.m +++ b/matlab/PlotPosteriorDistributions.m @@ -16,7 +16,7 @@ function oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt % SPECIAL REQUIREMENTS % none -% Copyright (C) 2005-2016 Dynare Team +% Copyright (C) 2005-2017 Dynare Team % % This file is part of Dynare. % @@ -63,7 +63,7 @@ for i=1:npar subplotnum = subplotnum+1; if subplotnum == 1 figunumber = figunumber+1; - hfig=dyn_figure(options_,'Name',figurename); + hfig=dyn_figure(options_.nodisplay,'Name',figurename); end [nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_); if subplotnum == 1 diff --git a/matlab/PosteriorIRF_core2.m b/matlab/PosteriorIRF_core2.m index 295f6d5eb9c17e80d6406632a08b1ddce4de7298..c4491f63193d7703214669649cee21bda32fe9d6 100644 --- a/matlab/PosteriorIRF_core2.m +++ b/matlab/PosteriorIRF_core2.m @@ -30,7 +30,7 @@ function myoutput=PosteriorIRF_core2(myinputs,fpar,npar,whoiam,ThisMatlab) % SPECIAL REQUIREMENTS. % None. % -% Copyright (C) 2006-2016 Dynare Team +% Copyright (C) 2006-2017 Dynare Team % % This file is part of Dynare. % @@ -103,9 +103,9 @@ for i=fpar:npar, if max(abs(MeanIRF(:,j,i))) >= options_.impulse_responses.plot_threshold subplotnum = subplotnum+1; if subplotnum == 1 && options_.relative_irf - hh = dyn_figure(options_,'Name',['Relative response to orthogonalized shock to ' tit(i,:)]); + hh = dyn_figure(options_.nodisplay,'Name',['Relative response to orthogonalized shock to ' tit(i,:)]); elseif subplotnum == 1 && ~options_.relative_irf - hh = dyn_figure(options_,'Name',['Orthogonalized shock to ' tit(i,:)]); + hh = dyn_figure(options_.nodisplay,'Name',['Orthogonalized shock to ' tit(i,:)]); end set(0,'CurrentFigure',hh) diff --git a/matlab/UnivariateSpectralDensity.m b/matlab/UnivariateSpectralDensity.m index fa0a9e22c4aa1e939f9a28f3ec02b9bc90e973b2..7152151b62042090c85a5a47f6988f54c051c109 100644 --- a/matlab/UnivariateSpectralDensity.m +++ b/matlab/UnivariateSpectralDensity.m @@ -19,7 +19,7 @@ function [oo_] = UnivariateSpectralDensity(M_,oo_,options_,var_list) % Adapted from th_autocovariances.m. -% Copyright (C) 2006-2015 Dynare Team +% Copyright (C) 2006-2017 Dynare Team % % This file is part of Dynare. % @@ -159,7 +159,7 @@ if options_.nograph == 0 end for i= 1:nvar - hh = dyn_figure(options_,'Name',['Spectral Density of ' deblank(M_.endo_names(ivar(i),:)) '.']); + hh = dyn_figure(options_.nodisplay,'Name',['Spectral Density of ' deblank(M_.endo_names(ivar(i),:)) '.']); plot(freqs,f(i,:),'-k','linewidth',2) xlabel('0 \leq \omega \leq \pi') ylabel('f(\omega)') diff --git a/matlab/convergence_diagnostics/McMCDiagnostics.m b/matlab/convergence_diagnostics/McMCDiagnostics.m index fb4f4126281e8ef2d3d804a149a0a7b8172da67a..4e0b669d18a3b056709531bcbde5f61f9cb6cc6b 100644 --- a/matlab/convergence_diagnostics/McMCDiagnostics.m +++ b/matlab/convergence_diagnostics/McMCDiagnostics.m @@ -16,7 +16,7 @@ function oo_ = McMCDiagnostics(options_, estim_params_, M_, oo_) % PARALLEL CONTEXT % See the comment in posterior_sampler.m funtion. -% Copyright (C) 2005-2016 Dynare Team +% Copyright (C) 2005-2017 Dynare Team % % This file is part of Dynare. % @@ -287,7 +287,7 @@ clear pmet temp moyenne CSUP CINF csup cinf n linea iter tmp; pages = floor(npar/3); k = 0; for i = 1:pages - h=dyn_figure(options_,'Name','MCMC univariate convergence diagnostic (Brooks and Gelman,1998)'); + h=dyn_figure(options_.nodisplay,'Name','MCMC univariate convergence diagnostic (Brooks and Gelman,1998)'); boxplot = 1; for j = 1:3 % Loop over parameters k = k+1; @@ -350,7 +350,7 @@ if reste nr = 2; nc = 3; end - h = dyn_figure(options_,'Name','MCMC univariate convergence diagnostic (Brooks and Gelman, 1998)'); + h = dyn_figure(options_.nodisplay,'Name','MCMC univariate convergence diagnostic (Brooks and Gelman, 1998)'); boxplot = 1; for j = 1:reste k = k+1; @@ -461,7 +461,7 @@ for iter = Origin:StepSize:NumberOfDraws end MDIAG(:,[2 4 6],:) = MDIAG(:,[2 4 6],:)/nblck; -h = dyn_figure(options_,'Name','Multivariate convergence diagnostic'); +h = dyn_figure(options_.nodisplay,'Name','Multivariate convergence diagnostic'); boxplot = 1; for crit = 1:3 if crit == 1 diff --git a/matlab/dyn_figure.m b/matlab/dyn_figure.m index f26a3934560482ea8fb47649811f55f54e3b9149..62182a291bb3d5dbd78da263a8ad149c8f852c0d 100644 --- a/matlab/dyn_figure.m +++ b/matlab/dyn_figure.m @@ -1,9 +1,9 @@ -function h=dyn_figure(DynareOptions,varargin) -%function h=dyn_figure(DynareOptions,varargin) +function h = dyn_figure(nodisplay, varargin) +%function h = dyn_figure(nodisplay, varargin) % initializes figures for DYNARE % % INPUTS -% DynareOptions: dynare options +% nodisplay: the value of the command-specific nodisplay argument or options_.nodisplay % varargin: the same list of possible inputs of the MATLAB function figure % % OUTPUTS @@ -12,7 +12,7 @@ function h=dyn_figure(DynareOptions,varargin) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2012 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -29,7 +29,7 @@ function h=dyn_figure(DynareOptions,varargin) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -if DynareOptions.nodisplay, +if nodisplay h = figure(varargin{:},'visible','off'); else h = figure(varargin{:}); diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 56221affe70fdb77a682ac88f6b1b666896bac84..94e6774fc17f37065ad17c014060c5e82399948f 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -12,7 +12,7 @@ function oo_recursive_=dynare_estimation(var_list,dname) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2015 Dynare Team +% Copyright (C) 2003-2017 Dynare Team % % This file is part of Dynare. % @@ -151,7 +151,7 @@ if nnobs > 1 && horizon > 0 for i = 1:size(var_list,1) if mod(i,nstar) == 1 plot_index=plot_index+1; - hfig = dyn_figure(options_,'Name',['Out of sample forecasts (',num2str(plot_index),')']); + hfig = dyn_figure(options_.nodisplay,'Name',['Out of sample forecasts (',num2str(plot_index),')']); m = 1; end subplot(nr,nc,m) diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 6693768cec75be1c325076369296764014a39310..b74ce455926d697d60edfcf7ebbd7492eb03ecf6 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2016 Dynare Team +% Copyright (C) 2003-2017 Dynare Team % % This file is part of Dynare. % @@ -542,7 +542,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha fprintf(fidTeX,' \n'); end for plt = 1:nbplt, - fh = dyn_figure(options_,'Name','Smoothed shocks'); + fh = dyn_figure(options_.nodisplay,'Name','Smoothed shocks'); NAMES = []; if options_.TeX, TeXNAMES = []; end nstar0=min(nstar,M_.exo_nbr-(plt-1)*nstar); @@ -621,7 +621,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha fprintf(fidTeX,' \n'); end for plt = 1:nbplt - fh = dyn_figure(options_,'Name','Smoothed observation errors'); + fh = dyn_figure(options_.nodisplay,'Name','Smoothed observation errors'); NAMES = []; if options_.TeX, TeXNAMES = []; end nstar0=min(nstar,number_of_plots_to_draw-(nbplt-1)*nstar); @@ -696,7 +696,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha fprintf(fidTeX,' \n'); end for plt = 1:nbplt, - fh = dyn_figure(options_,'Name','Historical and smoothed variables'); + fh = dyn_figure(options_.nodisplay,'Name','Historical and smoothed variables'); NAMES = []; if options_.TeX, TeXNAMES = []; end nstar0=min(nstar,n_varobs-(plt-1)*nstar); diff --git a/matlab/dynare_graph_init.m b/matlab/dynare_graph_init.m index 4e0af5b8c9d9211e8a86fffad59cf1ecdad81aa7..0783a4029add1e37533be7344686c8a424cda6d8 100644 --- a/matlab/dynare_graph_init.m +++ b/matlab/dynare_graph_init.m @@ -12,7 +12,7 @@ function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width) % SPECIAL REQUIREMENT % none -% Copyright (C) 2006-2013 Dynare Team +% Copyright (C) 2006-2017 Dynare Team % % This file is part of Dynare. % @@ -31,7 +31,7 @@ function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width) global options_ -dyn_graph.fh = dyn_figure(options_,'Name',figure_name); +dyn_graph.fh = dyn_figure(options_.nodisplay,'Name',figure_name); dyn_graph.figure_name = figure_name; if nargin > 2 dyn_graph.line_types = line_types; diff --git a/matlab/forecast_graphs.m b/matlab/forecast_graphs.m index be6f49399145e4041387784e8c8e6986bdc00009..8c444d887127a0f0b9ba6cf80b938a6ab4b776eb 100644 --- a/matlab/forecast_graphs.m +++ b/matlab/forecast_graphs.m @@ -8,7 +8,7 @@ function forecast_graphs(var_list,M_, oo_,options_) % o oo_ outputs structure % o options_ options structure -% Copyright (C) 2008-2016 Dynare Team +% Copyright (C) 2008-2017 Dynare Team % % This file is part of Dynare. % @@ -61,7 +61,7 @@ end m = 1; n_fig = 1; -hh=dyn_figure(options_,'Name','Forecasts (I)'); +hh=dyn_figure(options_.nodisplay,'Name','Forecasts (I)'); for j= 1:nvar if m > nc*nr; dyn_saveas(hh,[ dname '/graphs/forcst' int2str(n_fig)],options_); @@ -75,7 +75,7 @@ for j= 1:nvar fprintf(fidTeX,' \n'); end n_fig =n_fig+1; - eval(['hh=dyn_figure(options_,''Name'',''Forecasts (' int2str(n_fig) ')'');']); + eval(['hh=dyn_figure(options_.nodisplay,''Name'',''Forecasts (' int2str(n_fig) ')'');']); m = 1; end subplot(nr,nc,m); @@ -125,7 +125,7 @@ if isfield(oo_.forecast,'HPDinf_ME') m = 1; n_fig = 1; - hh=dyn_figure(options_,'Name','Forecasts including ME (I)'); + hh=dyn_figure(options_.nodisplay,'Name','Forecasts including ME (I)'); for j= 1:length(var_names) if m > nc*nr; dyn_saveas(hh,[ dname '/graphs/forcst_ME' int2str(n_fig)],options_); @@ -139,7 +139,7 @@ if isfield(oo_.forecast,'HPDinf_ME') fprintf(fidTeX,' \n'); end n_fig =n_fig+1; - eval(['hh=dyn_figure(options_,''Name'',''Forecasts (' int2str(n_fig) ')'');']); + eval(['hh=dyn_figure(options_.nodisplay,''Name'',''Forecasts (' int2str(n_fig) ')'');']); m = 1; end subplot(nr,nc,m); diff --git a/matlab/graph_decomp.m b/matlab/graph_decomp.m index 7740a07a9b332d6edb610f3f3326eaec4ea6b0e4..2e3c8000cd83a343163c42881ad7eb9a5ff94724 100644 --- a/matlab/graph_decomp.m +++ b/matlab/graph_decomp.m @@ -11,7 +11,7 @@ function []=graph_decomp(z,shock_names,endo_names,i_var,initial_date,DynareModel % DynareModel [structure] Dynare model structure % DynareOptions [structure] Dynare options structure -% Copyright (C) 2010-2016 Dynare Team +% Copyright (C) 2010-2017 Dynare Team % % This file is part of Dynare. % @@ -128,7 +128,7 @@ for j=1:nvar if ymax-ymin < 1e-6 continue end - fhandle = dyn_figure(DynareOptions,'Name',[preamble_txt fig_names_long strrep(fig_mode1, '_', ' ') ': ' deblank(endo_names(i_var(j),:)) '.'], 'PaperPositionMode', 'auto','PaperOrientation','landscape','renderermode','auto'); + fhandle = dyn_figure(DynareOptions.nodisplay,'Name',[preamble_txt fig_names_long strrep(fig_mode1, '_', ' ') ': ' deblank(endo_names(i_var(j),:)) '.'], 'PaperPositionMode', 'auto','PaperOrientation','landscape','renderermode','auto'); set(fhandle,'position' ,[50 50 1500 750]) ax=axes('Position',[0.1 0.1 0.6 0.8],'box','on'); % plot(ax,x(2:end),z1(end,:),'k-','LineWidth',2) diff --git a/matlab/graph_decomp_detail.m b/matlab/graph_decomp_detail.m index 931cb64a258379f55112bb42656dc870d802132b..759f7e72b79251b4c4d429cb999df5bfce41bed4 100644 --- a/matlab/graph_decomp_detail.m +++ b/matlab/graph_decomp_detail.m @@ -11,7 +11,7 @@ function []=graph_decomp_detail(z,shock_names,endo_names,i_var,initial_date,Dyna % DynareModel [structure] Dynare model structure % DynareOptions [structure] Dynare options structure -% Copyright (C) 2010-2016 Dynare Team +% Copyright (C) 2010-2017 Dynare Team % % This file is part of Dynare. % @@ -151,7 +151,7 @@ for j=1:nvar continue end for jf = 1:nfigs - fhandle = dyn_figure(DynareOptions,'Name',[preamble_txt fig_names_long strrep(fig_mode1, '_', ' ') ': ' deblank(endo_names(i_var(j),:)) ' (detail).'],'position',[200 100 650 850], 'PaperPositionMode', 'auto','PaperOrientation','portrait','renderermode','auto'); + fhandle = dyn_figure(DynareOptions.nodisplay,'Name',[preamble_txt fig_names_long strrep(fig_mode1, '_', ' ') ': ' deblank(endo_names(i_var(j),:)) ' (detail).'],'position',[200 100 650 850], 'PaperPositionMode', 'auto','PaperOrientation','portrait','renderermode','auto'); a0=zeros(1,4); a0(3)=inf; a0(4)=-inf; diff --git a/matlab/gsa/filt_mc_.m b/matlab/gsa/filt_mc_.m index 06f717e0e2dc998fc2278b770971ec2d80fc218f..9fdde4e9b556f9fdc51c7934e04c19388a673558 100644 --- a/matlab/gsa/filt_mc_.m +++ b/matlab/gsa/filt_mc_.m @@ -14,7 +14,7 @@ function [rmse_MC, ixx] = filt_mc_(OutDir,options_gsa_,dataset_,dataset_info) % marco.ratto@ec.europa.eu % Copyright (C) 2012-2016 European Commission -% Copyright (C) 2012-2016 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -407,7 +407,7 @@ else end if mod(i,9)==1, ifig=ifig+1; - hh=dyn_figure(options_,'name',[temp_name,' ',int2str(ifig)]); + hh=dyn_figure(options_.nodisplay,'name',[temp_name,' ',int2str(ifig)]); end subplot(3,3,i-9*(ifig-1)) h=cumplot(lnprior(ixx(1:nfilt0(i),i))); @@ -455,7 +455,7 @@ else end if mod(i,9)==1, ifig=ifig+1; - hh = dyn_figure(options_,'Name',[temp_name,' ',int2str(ifig)]); + hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]); end subplot(3,3,i-9*(ifig-1)) h=cumplot(likelihood(ixx(1:nfilt0(i),i))); @@ -506,7 +506,7 @@ else end if mod(i,9)==1, ifig=ifig+1; - hh = dyn_figure(options_,'Name',[temp_name,' ',int2str(ifig)]); + hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]); end subplot(3,3,i-9*(ifig-1)) h=cumplot(logpo2(ixx(1:nfilt0(i),i))); @@ -794,7 +794,7 @@ else for iy=1:size(vvarvecm,1), ipar = find(any(squeeze(PPV(iy,:,:))<alpha)); for ix=1:ceil(length(ipar)/5), - hh = dyn_figure(options_,'name',[temp_name,' observed variable ',deblank(vvarvecm(iy,:))]); + hh = dyn_figure(options_.nodisplay,'name',[temp_name,' observed variable ',deblank(vvarvecm(iy,:))]); for j=1+5*(ix-1):min(length(ipar),5*ix), subplot(2,3,j-5*(ix-1)) %h0=cumplot(x(:,nsnam(j)+nshock)); @@ -859,7 +859,7 @@ else % now I plot by individual parameters for ix=1:ceil(length(nsnam)/5), - hh = dyn_figure(options_,'name',[temp_name,' estimated params and shocks ',int2str(ix)]); + hh = dyn_figure(options_.nodisplay,'name',[temp_name,' estimated params and shocks ',int2str(ix)]); for j=1+5*(ix-1):min(size(snam2,1),5*ix), subplot(2,3,j-5*(ix-1)) %h0=cumplot(x(:,nsnam(j)+nshock)); diff --git a/matlab/gsa/map_calibration.m b/matlab/gsa/map_calibration.m index d7dea5b5c850c0690e5511b38284ca197193ec06..26bc505910e0ce2fbf20eddaf4d93ccb833a7504 100644 --- a/matlab/gsa/map_calibration.m +++ b/matlab/gsa/map_calibration.m @@ -5,7 +5,7 @@ function map_calibration(OutputDirectoryName, Model, DynareOptions, DynareResult % marco.ratto@ec.europa.eu % Copyright (C) 2014-2016 European Commission -% Copyright (C) 2014-2016 Dynare Team +% Copyright (C) 2014-2017 Dynare Team % % This file is part of Dynare. % @@ -191,7 +191,7 @@ if ~isempty(indx_irf), indx_irf = indx_irf(irestrictions,:); if ~DynareOptions.nograph, - h1=dyn_figure(DynareOptions,'name',[type ' evaluation of irf restrictions']); + h1=dyn_figure(DynareOptions.nodisplay,'name',[type ' evaluation of irf restrictions']); nrow=ceil(sqrt(nbr_irf_couples)); ncol=nrow; if nrow*(nrow-1)>nbr_irf_couples, @@ -405,7 +405,7 @@ if ~isempty(indx_moment) indx_moment = indx_moment(irestrictions,:); if ~DynareOptions.nograph, - h2=dyn_figure(DynareOptions,'name',[type ' evaluation of moment restrictions']); + h2=dyn_figure(DynareOptions.nodisplay,'name',[type ' evaluation of moment restrictions']); nrow=ceil(sqrt(nbr_moment_couples)); ncol=nrow; if nrow*(nrow-1)>nbr_moment_couples, diff --git a/matlab/gsa/map_ident_.m b/matlab/gsa/map_ident_.m index 7dc3873dbf2d12997adccbc29c34589e505fe90b..af7c53f7cb7c9da4f7f7bf607918c8786a1831db 100644 --- a/matlab/gsa/map_ident_.m +++ b/matlab/gsa/map_ident_.m @@ -5,7 +5,7 @@ function map_ident_(OutputDirectoryName,opt_gsa) % marco.ratto@ec.europa.eu % Copyright (C) 2012-2016 European Commission -% Copyright (C) 2012-2016 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -90,7 +90,7 @@ if opt_gsa.load_ident_files==0, ifig=0; for j=1:M_.exo_nbr, if mod(j,6)==1 - hh=dyn_figure(options_,'name',['Variance decomposition shocks']); + hh=dyn_figure(options_.nodisplay,'name',['Variance decomposition shocks']); ifig=ifig+1; iplo=0; end @@ -219,7 +219,7 @@ if opt_gsa.morris==1, load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAvdec','vdec','ir_vdec','ic_vdec') end - hh = dyn_figure(options_,'name','Screening identification: variance decomposition'); + hh = dyn_figure(options_.nodisplay,'name','Screening identification: variance decomposition'); % boxplot(SAvdec,'whis',10,'symbol','r.') myboxplot(SAvdec,[],'.',[],10) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) @@ -325,7 +325,7 @@ if opt_gsa.morris==1, load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'ac','ir_ac','ic_ac') end - hh=dyn_figure(options_,'name','Screening identification: theoretical moments'); + hh=dyn_figure(options_.nodisplay,'name','Screening identification: theoretical moments'); % boxplot(SAcc,'whis',10,'symbol','r.') myboxplot(SAcc,[],'.',[],10) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) @@ -722,7 +722,7 @@ if opt_gsa.morris==1, else load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAnorm','SAmunorm','SAsignorm') end - hh=dyn_figure(options_,'name','Screening identification: model'); %bar(SAnorm(:,irel)) + hh=dyn_figure(options_.nodisplay,'name','Screening identification: model'); %bar(SAnorm(:,irel)) % boxplot(SAnorm','whis',10,'symbol','r.') myboxplot(SAnorm',[],'.',[],10) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) @@ -739,7 +739,7 @@ if opt_gsa.morris==1, dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morris_par'],options_); create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_morris_par'],1,'Screening identification: model','morris_par',1) -% hh=dyn_figure(options_); %bar(SAmunorm(:,irel)) +% hh=dyn_figure(options_.nodisplay); %bar(SAmunorm(:,irel)) % % boxplot(SAmunorm','whis',10,'symbol','r.') % myboxplot(SAmunorm',[],'.',[],10) % set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) @@ -754,7 +754,7 @@ if opt_gsa.morris==1, % title('\mu in the model') % dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morrismu_par'],options_); % -% hh=dyn_figure(options_); %bar(SAsignorm(:,irel)) +% hh=dyn_figure(options_.nodisplay); %bar(SAsignorm(:,irel)) % % boxplot(SAsignorm','whis',10,'symbol','r.') % myboxplot(SAsignorm',[],'.',[],10) % set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) @@ -1522,7 +1522,7 @@ else, % main effects analysis % SAmeanexo=mean(SAmomN(:,1:nshock)); % figure, bar(latent'*SAcc), - hh=dyn_figure(options_,'Name',['Identifiability indices in the ',fsuffix,' moments.']); + hh=dyn_figure(options_.nodisplay,'Name',['Identifiability indices in the ',fsuffix,' moments.']); bar(sum(SAcc)), set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) set(gca,'xlim',[0.5 npT+0.5]) diff --git a/matlab/gsa/redform_map.m b/matlab/gsa/redform_map.m index 4b1ceeb554356030cf452c60fa6d92d272b80169..3b4534a5b306459738732c982dd67088c9da7884 100644 --- a/matlab/gsa/redform_map.m +++ b/matlab/gsa/redform_map.m @@ -16,7 +16,7 @@ function redform_map(dirname,options_gsa_) % marco.ratto@ec.europa.eu % Copyright (C) 2012-2016 European Commission -% Copyright (C) 2012-2016 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -165,7 +165,7 @@ for j=1:size(anamendo,1) if (max(y0)-min(y0))>1.e-10, if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph, ifig=ifig+1; - hfig = dyn_figure(options_,'name',['Reduced Form Mapping: ', namendo,' vs shocks ',int2str(ifig)]); + hfig = dyn_figure(options_.nodisplay,'name',['Reduced Form Mapping: ', namendo,' vs shocks ',int2str(ifig)]); iplo=0; end iplo=iplo+1; @@ -193,7 +193,7 @@ for j=1:size(anamendo,1) mkdir(xdir) end if ~options_.nograph, - hf=dyn_figure(options_,'name',['Reduced Form Mapping (Monte Carlo Filtering): ',namendo,' vs ', namexo]); + hf=dyn_figure(options_.nodisplay,'name',['Reduced Form Mapping (Monte Carlo Filtering): ',namendo,' vs ', namexo]); hc = cumplot(y0); a=axis; delete(hc); % hist(mat_moment{ij}), @@ -301,7 +301,7 @@ for j=1:size(anamendo,1) if (max(y0)-min(y0))>1.e-10, if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph, ifig=ifig+1; - hfig = dyn_figure(options_,'name',['Reduced Form Mapping: ' namendo,' vs lags ',int2str(ifig)]); + hfig = dyn_figure(options_.nodisplay,'name',['Reduced Form Mapping: ' namendo,' vs lags ',int2str(ifig)]); iplo=0; end iplo=iplo+1; @@ -329,7 +329,7 @@ for j=1:size(anamendo,1) mkdir(xdir) end if ~options_.nograph, - hf=dyn_figure(options_,'name',['Reduced Form Mapping (Monte Carlo Filtering): ',namendo,' vs lagged ', namlagendo]); + hf=dyn_figure(options_.nodisplay,'name',['Reduced Form Mapping (Monte Carlo Filtering): ',namendo,' vs lagged ', namlagendo]); hc = cumplot(y0); a=axis; delete(hc); % hist(mat_moment{ij}), @@ -428,7 +428,7 @@ end if isempty(threshold) && ~options_.nograph, if ilog==0, - hfig=dyn_figure(options_,'name','Reduced Form GSA'); %bar(si) + hfig=dyn_figure(options_.nodisplay,'name','Reduced Form GSA'); %bar(si) % boxplot(si','whis',10,'symbol','r.') myboxplot(si',[],'.',[],10) xlabel(' ') @@ -444,7 +444,7 @@ if isempty(threshold) && ~options_.nograph, create_TeX_loader(options_,[dirname,filesep,M_.fname,'_redform_gsa'],'Reduced Form GSA','redform_gsa') else - hfig=dyn_figure(options_,'name','Reduced Form GSA'); %bar(silog) + hfig=dyn_figure(options_.nodisplay,'name','Reduced Form GSA'); %bar(silog) % boxplot(silog','whis',10,'symbol','r.') myboxplot(silog',[],'.',[],10) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:np]) @@ -522,7 +522,7 @@ if iload==0, y1 = log(y0*isig+lam); end if ~options_.nograph, - hfig=dyn_figure(options_,'name',options_map.figtitle); + hfig=dyn_figure(options_.nodisplay,'name',options_map.figtitle); subplot(221) if ilog, hist(y1,30), @@ -647,7 +647,7 @@ else load([fname,'_map.mat'],'gsa_') if ~options_.nograph, yf = ss_anova_fcast(x0, gsa_); - hfig=dyn_figure(options_,'name',options_map.title); + hfig=dyn_figure(options_.nodisplay,'name',options_map.title); plot(y0,[yf y0],'.'), title([namy,' vs ', namx,' pred'],'interpreter','none') dyn_saveas(hfig,[fname '_pred'],options_); @@ -724,7 +724,7 @@ return function indmcf = redform_mcf(y0, x0, options_mcf, options_) -hfig=dyn_figure(options_,'name',options_mcf.amcf_title); +hfig=dyn_figure(options_.nodisplay,'name',options_mcf.amcf_title); [post_mean, post_median, post_var, hpd_interval, post_deciles, ... density] = posterior_moments(y0,1,0.9); diff --git a/matlab/gsa/redform_screen.m b/matlab/gsa/redform_screen.m index ae1d8df741265f72a4fafc79b063aaf55fe224ad..96773cdffd1b70e38f39d0ff978a661ba8ca4998 100644 --- a/matlab/gsa/redform_screen.m +++ b/matlab/gsa/redform_screen.m @@ -11,7 +11,7 @@ function redform_screen(dirname, options_gsa_) % marco.ratto@ec.europa.eu % Copyright (C) 2012-2016 European Commission -% Copyright (C) 2012-2016 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -68,7 +68,7 @@ for j=1:size(anamendo,1), if ~isempty(y0), if mod(iplo,9)==0, ifig=ifig+1; - hh=dyn_figure(options_,'name',[namendo,' vs. shocks ',int2str(ifig)]); + hh=dyn_figure(options_.nodisplay,'name',[namendo,' vs. shocks ',int2str(ifig)]); iplo=0; end iplo=iplo+1; @@ -110,7 +110,7 @@ for j=1:size(anamendo,1), if ~isempty(y0), if mod(iplo,9)==0, ifig=ifig+1; - hh=dyn_figure(options_,'name',[namendo,' vs. lagged endogenous ',int2str(ifig)]); + hh=dyn_figure(options_.nodisplay,'name',[namendo,' vs. lagged endogenous ',int2str(ifig)]); iplo=0; end iplo=iplo+1; @@ -142,7 +142,7 @@ for j=1:size(anamendo,1), end end -hh=dyn_figure(options_,'Name','Reduced form screening'); +hh=dyn_figure(options_.nodisplay,'Name','Reduced form screening'); %bar(SA) % boxplot(SA','whis',10,'symbol','r.') myboxplot(SA',[],'.',[],10) diff --git a/matlab/gsa/scatter_mcf.m b/matlab/gsa/scatter_mcf.m index f6f134a5c9573335e8264825010370de33a4f649..c6fccfdb6f5de923259a5e3a7f04d3bf820b7733 100644 --- a/matlab/gsa/scatter_mcf.m +++ b/matlab/gsa/scatter_mcf.m @@ -5,7 +5,7 @@ function scatter_mcf(X,Y,vnames,plotsymbol, fnam, dirname, figtitle, xparam1, D % marco.ratto@ec.europa.eu % Copyright (C) 2014-2016 European Commission -% Copyright (C) 2014-2016 Dynare Team +% Copyright (C) 2014-2017 Dynare Team % % This file is part of Dynare. % @@ -84,7 +84,7 @@ figtitle_tex=strrep(figtitle,'_','\_'); fig_nam_=[fnam]; if ~nograph, - hh=dyn_figure(DynareOptions,'name',figtitle); + hh=dyn_figure(DynareOptions.nodisplay,'name',figtitle); end bf = 0.1; diff --git a/matlab/gsa/scatter_plots.m b/matlab/gsa/scatter_plots.m index a2c71eeafe301413db4cc0c0bfd520ec707ef908..b3a3b498f0ad581cb5219dae5e7edfa678e4e832 100644 --- a/matlab/gsa/scatter_plots.m +++ b/matlab/gsa/scatter_plots.m @@ -73,7 +73,7 @@ figtitle_tex=strrep(figtitle,'_','\_'); fig_nam_=[fnam]; if ~nograph, - hh=dyn_figure(DynareOptions,'name',figtitle); + hh=dyn_figure(DynareOptions.nodisplay,'name',figtitle); set(hh,'userdata',{X,xp}) end diff --git a/matlab/gsa/stab_map_1.m b/matlab/gsa/stab_map_1.m index 5295d0e30166f297331c073cf518766dfbec3d5a..a4f30821a108b22e8dea9354cce6465574694d5a 100644 --- a/matlab/gsa/stab_map_1.m +++ b/matlab/gsa/stab_map_1.m @@ -21,7 +21,7 @@ function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, i % marco.ratto@ec.europa.eu % Copyright (C) 2012-2016 European Commission -% Copyright (C) 2012-2016 Dynare Team +% Copyright (C) 2012-2017 Dynare Team % % This file is part of Dynare. % @@ -82,7 +82,7 @@ if iplot && ~options_.nograph ftit=bayestopt_.name(ipar+nshock*(1-ishock)); for i=1:ceil(nparplot/12), - hh=dyn_figure(options_,'name',atitle); + hh=dyn_figure(options_.nodisplay,'name',atitle); for j=1+12*(i-1):min(nparplot,12*i), subplot(3,4,j-12*(i-1)) if ~isempty(ibehaviour), diff --git a/matlab/gsa/stab_map_2.m b/matlab/gsa/stab_map_2.m index 35c3df82c7155e6a95f2a3df06ee08c1fdc01bcd..561d883c4cd724cfcba6c67355f0d9b2190eebfc 100644 --- a/matlab/gsa/stab_map_2.m +++ b/matlab/gsa/stab_map_2.m @@ -6,7 +6,7 @@ function indcorr = stab_map_2(x,alpha2, pvalue_crit, fnam, dirname,xparam1,figti % marco.ratto@ec.europa.eu % Copyright (C) 2011-2016 European Commission -% Copyright (C) 2011-2016 Dynare Team +% Copyright (C) 2011-2017 Dynare Team % This file is part of Dynare. % % Dynare is free software: you can redistribute it and/or modify @@ -119,7 +119,7 @@ for j=1:npar, if ~nograph, if mod(j2,12)==1, ifig=ifig+1; - hh=dyn_figure(options_,'name',[figtitle,' sample bivariate projection ', num2str(ifig)]); + hh=dyn_figure(options_.nodisplay,'name',[figtitle,' sample bivariate projection ', num2str(ifig)]); end subplot(3,4,j2-(ifig-1)*12) % bar(c0(i2,j)), diff --git a/matlab/mh_autocorrelation_function.m b/matlab/mh_autocorrelation_function.m index 96b4c5875f3b76b824d02fc2edc85647e7ead450..ceffbbd76a978fd8aed443520b692c69621e82fc 100644 --- a/matlab/mh_autocorrelation_function.m +++ b/matlab/mh_autocorrelation_function.m @@ -18,7 +18,7 @@ function mh_autocorrelation_function(options_,M_,estim_params_,type,blck,name1,n % % SPECIAL REQUIREMENTS -% Copyright (C) 2003-2013 Dynare Team +% Copyright (C) 2003-2017 Dynare Team % % This file is part of Dynare. % @@ -91,7 +91,7 @@ if options_.mh_nblck>1 FigureName = [ FigureName , ' (block number' int2str(blck) ').']; end -hh=dyn_figure(options_,'Name',FigureName); +hh=dyn_figure(options_.nodisplay,'Name',FigureName); bar(0:options_.mh_autocorrelation_function_size,autocor,'k'); axis tight diff --git a/matlab/mode_check.m b/matlab/mode_check.m index 8d216bcbfe3ab13dd654a4ae674afc5453b7d7b6..e16c9c1a9ca664b1ffc08e211dcdb5feb63be122 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -40,7 +40,7 @@ function mode_check(fun,x,hessian_mat,DynareDataset,DatasetInfo,DynareOptions,Mo %! @end deftypefn %@eod: -% Copyright (C) 2003-2016 Dynare Team +% Copyright (C) 2003-2017 Dynare Team % % This file is part of Dynare. % @@ -96,7 +96,7 @@ for plt = 1:nbplt, NAMES = []; TeXNAMES = []; end - hh = dyn_figure(DynareOptions,'Name','Mode check plots'); + hh = dyn_figure(DynareOptions.nodisplay,'Name','Mode check plots'); for k=1:min(nstar,length(x)-(plt-1)*nstar) subplot(nr,nc,k) kk = (plt-1)*nstar+k; diff --git a/matlab/particles b/matlab/particles index 79b42ec947aa1dbe009778f3874f074f0d14eb7a..20978ce117597f2ce83afb2fbcd92347ee1642d1 160000 --- a/matlab/particles +++ b/matlab/particles @@ -1 +1 @@ -Subproject commit 79b42ec947aa1dbe009778f3874f074f0d14eb7a +Subproject commit 20978ce117597f2ce83afb2fbcd92347ee1642d1 diff --git a/matlab/plot_icforecast.m b/matlab/plot_icforecast.m index 62d788414f0c7265e161a0e110e66725de807968..9752d53768c7cfb76f8eb55ec5d266e9e89639d2 100644 --- a/matlab/plot_icforecast.m +++ b/matlab/plot_icforecast.m @@ -10,7 +10,7 @@ function plot_icforecast(Variables,periods,options_) % SPECIAL REQUIREMENTS % This routine has to be called after imcforecast.m. -% Copyright (C) 2006-2016 Dynare Team +% Copyright (C) 2006-2017 Dynare Team % % This file is part of Dynare. % @@ -57,7 +57,7 @@ for i=1:size(Variables,1) end function build_figure(name,cci1,cci2,mm1,mm2,options_,graphoptions) -hh = dyn_figure(options_,'Name',['Conditional forecast (' graphoptions.title ,'): ' name '.']); +hh = dyn_figure(options_.nodisplay,'Name',['Conditional forecast (' graphoptions.title ,'): ' name '.']); H = length(mm1); h1 = area(1:H,cci1(2,1:H),'BaseValue',min([min(cci1(1,:)),min(cci2(1,:))]),'FaceColor',[.9 .9 .9]); hold on diff --git a/matlab/plot_identification.m b/matlab/plot_identification.m index e24695025000078d654ffcb2505d61b13df36049..78ac328a50aa89bf5826ac1fdd0ece35ddf755f3 100644 --- a/matlab/plot_identification.m +++ b/matlab/plot_identification.m @@ -19,7 +19,7 @@ function plot_identification(params,idemoments,idehess,idemodel, idelre, advance % SPECIAL REQUIREMENTS % None -% Copyright (C) 2008-2016 Dynare Team +% Copyright (C) 2008-2017 Dynare Team % % This file is part of Dynare. % @@ -60,7 +60,7 @@ tittxt1=regexprep(tittxt, ' ', '_'); tittxt1=strrep(tittxt1, '.', ''); if SampleSize == 1, siJ = idemoments.siJ; - hh = dyn_figure(options_,'Name',[tittxt, ' - Identification using info from observables']); + hh = dyn_figure(options_.nodisplay,'Name',[tittxt, ' - Identification using info from observables']); subplot(211) mmm = (idehess.ide_strength_J); [ss, is] = sort(mmm); @@ -132,7 +132,7 @@ if SampleSize == 1, if all(isnan([siJnorm';siHnorm';siLREnorm'])) fprintf('\nIDENTIFICATION: Skipping sensitivity plot, because standard deviation of parameters is NaN, possibly due to the use of ML.\n') else - hh = dyn_figure(options_,'Name',[tittxt, ' - Sensitivity plot']); + hh = dyn_figure(options_.nodisplay,'Name',[tittxt, ' - Sensitivity plot']); subplot(211) mmm = (siJnorm)'./max(siJnorm); mmm1 = (siHnorm)'./max(siHnorm); @@ -185,7 +185,7 @@ if SampleSize == 1, end % fprintf('%-15s [%s] %10.3f\n',name{i},namx,idemoments.cosnJ(i,j)) end - hh = dyn_figure(options_,'Name',[tittxt,' - Collinearity patterns with ', int2str(j) ,' parameter(s)']); + hh = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Collinearity patterns with ', int2str(j) ,' parameter(s)']); imagesc(pax,[0 1]); set(gca,'xticklabel','') set(gca,'yticklabel','') @@ -225,24 +225,24 @@ if SampleSize == 1, S=diag(S); if idehess.flag_score, if nparam<5, - f1 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (Information matrix)']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (Information matrix)']); tex_tit_1=[tittxt,' - Identification patterns (Information matrix)']; else - f1 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (Information matrix): SMALLEST SV']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (Information matrix): SMALLEST SV']); tex_tit_1=[tittxt,' - Identification patterns (Information matrix): SMALLEST SV']; - f2 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (Information matrix): HIGHEST SV']); + f2 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (Information matrix): HIGHEST SV']); tex_tit_2=[tittxt,' - Identification patterns (Information matrix): HIGHEST SV']; end else % S = idemoments.S; % V = idemoments.V; if nparam<5, - f1 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (moments Information matrix)']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (moments Information matrix)']); tex_tit_1=[tittxt,' - Identification patterns (moments Information matrix)']; else - f1 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (moments Information matrix): SMALLEST SV']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (moments Information matrix): SMALLEST SV']); tex_tit_1=[tittxt,' - Identification patterns (moments Information matrix): SMALLEST SV']; - f2 = dyn_figure(options_,'Name',[tittxt,' - Identification patterns (moments Information matrix): HIGHEST SV']); + f2 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - Identification patterns (moments Information matrix): HIGHEST SV']); tex_tit_2=[tittxt,' - Identification patterns (moments Information matrix): HIGHEST SV']; end end @@ -303,7 +303,7 @@ if SampleSize == 1, end else - hh = dyn_figure(options_,'Name',['MC sensitivities']); + hh = dyn_figure(options_.nodisplay,'Name',['MC sensitivities']); subplot(211) mmm = (idehess.ide_strength_J); [ss, is] = sort(mmm); @@ -350,7 +350,7 @@ else disp('Press ENTER to display advanced diagnostics'), pause(5), end % options_.nograph=1; - hh = dyn_figure(options_,'Name','MC Condition Number'); + hh = dyn_figure(options_.nodisplay,'Name','MC Condition Number'); subplot(221) hist(log10(idemodel.cond)) title('log10 of Condition number in the model') @@ -398,12 +398,12 @@ else % end if nparam<5, - f1 = dyn_figure(options_,'Name',[tittxt,' - MC Identification patterns (moments): HIGHEST SV']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - MC Identification patterns (moments): HIGHEST SV']); tex_tit_1=[tittxt,' - MC Identification patterns (moments): HIGHEST SV']; else - f1 = dyn_figure(options_,'Name',[tittxt,' - MC Identification patterns (moments): SMALLEST SV']); + f1 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - MC Identification patterns (moments): SMALLEST SV']); tex_tit_1=[tittxt,' - MC Identification patterns (moments): SMALLEST SV']; - f2 = dyn_figure(options_,'Name',[tittxt,' - MC Identification patterns (moments): HIGHEST SV']); + f2 = dyn_figure(options_.nodisplay,'Name',[tittxt,' - MC Identification patterns (moments): HIGHEST SV']); tex_tit_2=[tittxt,' - MC Identification patterns (moments): HIGHEST SV']; end nplots=min(nparam,8); diff --git a/matlab/plot_priors.m b/matlab/plot_priors.m index 15842b8e96cffd8142be9c73b6b0d861c72cb1ac..f8a77fe04b552244471a40a163ad180b92a4ee0d 100644 --- a/matlab/plot_priors.m +++ b/matlab/plot_priors.m @@ -13,7 +13,7 @@ function plot_priors(bayestopt_,M_,estim_params_,options_) % SPECIAL REQUIREMENTS % None -% Copyright (C) 2004-2016 Dynare Team +% Copyright (C) 2004-2017 Dynare Team % % This file is part of Dynare. % @@ -43,7 +43,7 @@ if TeX && any(strcmp('eps',cellstr(options_.graph_format))) fprintf(fidTeX,' \n'); end for plt = 1:nbplt, - hplt = dyn_figure(options_,'Name',figurename); + hplt = dyn_figure(options_.nodisplay,'Name',figurename); if TeX TeXNAMES = []; NAMES = []; diff --git a/matlab/pm3_core.m b/matlab/pm3_core.m index c2d248f760d15e83f394c68b194a37d976149477..9443f9e9fed442c6356efa2ad29a51aed1a1b30e 100644 --- a/matlab/pm3_core.m +++ b/matlab/pm3_core.m @@ -13,7 +13,7 @@ function myoutput=pm3_core(myinputs,fpar,nvar,whoiam, ThisMatlab) % SPECIAL REQUIREMENTS. % None. -% Copyright (C) 2007-2016 Dynare Team +% Copyright (C) 2007-2017 Dynare Team % % This file is part of Dynare. % @@ -64,7 +64,7 @@ end figunumber = 0; subplotnum = 0; -hh = dyn_figure(options_,'Name',[tit1 ' ' int2str(figunumber+1)]); +hh = dyn_figure(options_.nodisplay,'Name',[tit1 ' ' int2str(figunumber+1)]); RemoteFlag = 0; if whoiam, if Parallel(ThisMatlab).Local ==0 @@ -115,7 +115,7 @@ for i=fpar:nvar subplotnum = 0; figunumber = figunumber+1; if (i ~= nvar) - hh = dyn_figure(options_,'Name',[name3 ' ' int2str(figunumber+1)]); + hh = dyn_figure(options_.nodisplay,'Name',[name3 ' ' int2str(figunumber+1)]); end end diff --git a/matlab/rplot.m b/matlab/rplot.m index 5705abdc1b74d8971cca14d05c540d3eb113a225..ba2d3b1dffb167245a713e6b7977e77a9ab01713 100644 --- a/matlab/rplot.m +++ b/matlab/rplot.m @@ -14,7 +14,7 @@ function rplot(s1) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2001-2016 Dynare Team +% Copyright (C) 2001-2017 Dynare Team % % This file is part of Dynare. % @@ -81,7 +81,7 @@ if rplottype == 0 for j = 1:size(y,1) t = [t s1(j,:) ' '] ; end - hh=dyn_figure(options_,'Name',['Simulated Trajectory']); + hh=dyn_figure(options_.nodisplay,'Name',['Simulated Trajectory']); plot(ix(i),y(:,i)) ; title (t,'Interpreter','none') ; xlabel('Periods') ; @@ -100,7 +100,7 @@ if rplottype == 0 end elseif rplottype == 1 for j = 1:size(y,1) - hh=dyn_figure(options_,'Name',['Simulated Trajectory']); + hh=dyn_figure(options_.nodisplay,'Name',['Simulated Trajectory']); plot(ix(i),y(j,i)) ; xlim([min(ix(i)) max(ix(i))]) title(['Plot of ' s1(j,:)],'Interpreter','none') ; @@ -111,7 +111,7 @@ elseif rplottype == 1 end end elseif rplottype == 2 - hh=dyn_figure(options_,'Name',['Simulated Trajectory']); + hh=dyn_figure(options_.nodisplay,'Name',['Simulated Trajectory']); nl = max(1,fix(size(y,1)/4)) ; nc = ceil(size(y,1)/nl) ; for j = 1:size(y,1) diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index 1314c3a632a8979de932ae67368f1b58ec0221b5..81f53c90e00ddd25455186ef1d355c3af7bd686f 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -1,6 +1,6 @@ function info=stoch_simul(var_list) -% Copyright (C) 2001-2016 Dynare Team +% Copyright (C) 2001-2017 Dynare Team % % This file is part of Dynare. % @@ -253,10 +253,10 @@ if options_.irf if nbplt == 0 elseif nbplt == 1 if options_.relative_irf - hh = dyn_figure(options_,'Name',['Relative response to' ... + hh = dyn_figure(options_.nodisplay,'Name',['Relative response to' ... ' orthogonalized shock to ' tit(i,:)]); else - hh = dyn_figure(options_,'Name',['Orthogonalized shock to' ... + hh = dyn_figure(options_.nodisplay,'Name',['Orthogonalized shock to' ... ' ' tit(i,:)]); end for j = 1:number_of_plots_to_draw @@ -285,10 +285,10 @@ if options_.irf else for fig = 1:nbplt-1 if options_.relative_irf - hh = dyn_figure(options_,'Name',['Relative response to orthogonalized shock' ... + hh = dyn_figure(options_.nodisplay,'Name',['Relative response to orthogonalized shock' ... ' to ' tit(i,:) ' figure ' int2str(fig)]); else - hh = dyn_figure(options_,'Name',['Orthogonalized shock to ' tit(i,:) ... + hh = dyn_figure(options_.nodisplay,'Name',['Orthogonalized shock to ' tit(i,:) ... ' figure ' int2str(fig)]); end for plt = 1:nstar @@ -321,7 +321,7 @@ if options_.irf fprintf(fidTeX,' \n'); end end - hh = dyn_figure(options_,'Name',['Orthogonalized shock to ' tit(i,:) ' figure ' int2str(nbplt) '.']); + hh = dyn_figure(options_.nodisplay,'Name',['Orthogonalized shock to ' tit(i,:) ' figure ' int2str(nbplt) '.']); m = 0; for plt = 1:number_of_plots_to_draw-(nbplt-1)*nstar; m = m+1; diff --git a/matlab/trace_plot.m b/matlab/trace_plot.m index 1073480d6d474b9546b8aef25bae59197648d302..72f8f7ab3dbccdec5a5adf830aa1cd9832bf75a7 100644 --- a/matlab/trace_plot.m +++ b/matlab/trace_plot.m @@ -18,7 +18,7 @@ function trace_plot(options_,M_,estim_params_,type,blck,name1,name2) % % SPECIAL REQUIREMENTS -% Copyright (C) 2003-2016 Dynare Team +% Copyright (C) 2003-2017 Dynare Team % % This file is part of Dynare. % @@ -95,7 +95,7 @@ if options_.mh_nblck>1 FigureName = [ FigureName , ' (block number ' int2str(blck) ').']; end -hh=dyn_figure(options_,'Name',FigureName); +hh=dyn_figure(options_.nodisplay,'Name',FigureName); plot(1:TotalNumberOfMhDraws,PosteriorDraws,'Color',[.7 .7 .7]);