change dyn_figure to take a nodisplay argument as opposed to options_. #1415

time-shift
Houtan Bastani 2017-03-22 16:54:11 +01:00
parent 76097a799f
commit 2aa85f978a
30 changed files with 110 additions and 110 deletions

View File

@ -16,7 +16,7 @@ function oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2005-2016 Dynare Team % Copyright (C) 2005-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -63,7 +63,7 @@ for i=1:npar
subplotnum = subplotnum+1; subplotnum = subplotnum+1;
if subplotnum == 1 if subplotnum == 1
figunumber = figunumber+1; figunumber = figunumber+1;
hfig=dyn_figure(options_,'Name',figurename); hfig=dyn_figure(options_.nodisplay,'Name',figurename);
end end
[nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_); [nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_);
if subplotnum == 1 if subplotnum == 1

View File

@ -30,7 +30,7 @@ function myoutput=PosteriorIRF_core2(myinputs,fpar,npar,whoiam,ThisMatlab)
% SPECIAL REQUIREMENTS. % SPECIAL REQUIREMENTS.
% None. % None.
% %
% Copyright (C) 2006-2016 Dynare Team % Copyright (C) 2006-2017 Dynare Team
% %
% This file is part of Dynare. % 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 if max(abs(MeanIRF(:,j,i))) >= options_.impulse_responses.plot_threshold
subplotnum = subplotnum+1; subplotnum = subplotnum+1;
if subplotnum == 1 && options_.relative_irf 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 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 end
set(0,'CurrentFigure',hh) set(0,'CurrentFigure',hh)

View File

@ -19,7 +19,7 @@ function [oo_] = UnivariateSpectralDensity(M_,oo_,options_,var_list)
% Adapted from th_autocovariances.m. % Adapted from th_autocovariances.m.
% Copyright (C) 2006-2015 Dynare Team % Copyright (C) 2006-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -159,7 +159,7 @@ if options_.nograph == 0
end end
for i= 1:nvar 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) plot(freqs,f(i,:),'-k','linewidth',2)
xlabel('0 \leq \omega \leq \pi') xlabel('0 \leq \omega \leq \pi')
ylabel('f(\omega)') ylabel('f(\omega)')

View File

@ -16,7 +16,7 @@ function oo_ = McMCDiagnostics(options_, estim_params_, M_, oo_)
% PARALLEL CONTEXT % PARALLEL CONTEXT
% See the comment in posterior_sampler.m funtion. % 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. % 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); pages = floor(npar/3);
k = 0; k = 0;
for i = 1:pages 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; boxplot = 1;
for j = 1:3 % Loop over parameters for j = 1:3 % Loop over parameters
k = k+1; k = k+1;
@ -350,7 +350,7 @@ if reste
nr = 2; nr = 2;
nc = 3; nc = 3;
end 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; boxplot = 1;
for j = 1:reste for j = 1:reste
k = k+1; k = k+1;
@ -461,7 +461,7 @@ for iter = Origin:StepSize:NumberOfDraws
end end
MDIAG(:,[2 4 6],:) = MDIAG(:,[2 4 6],:)/nblck; 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; boxplot = 1;
for crit = 1:3 for crit = 1:3
if crit == 1 if crit == 1

View File

@ -1,9 +1,9 @@
function h=dyn_figure(DynareOptions,varargin) function h = dyn_figure(nodisplay, varargin)
%function h=dyn_figure(DynareOptions,varargin) %function h = dyn_figure(nodisplay, varargin)
% initializes figures for DYNARE % initializes figures for DYNARE
% %
% INPUTS % 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 % varargin: the same list of possible inputs of the MATLAB function figure
% %
% OUTPUTS % OUTPUTS
@ -12,7 +12,7 @@ function h=dyn_figure(DynareOptions,varargin)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2012 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % 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 % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if DynareOptions.nodisplay, if nodisplay
h = figure(varargin{:},'visible','off'); h = figure(varargin{:},'visible','off');
else else
h = figure(varargin{:}); h = figure(varargin{:});

View File

@ -12,7 +12,7 @@ function oo_recursive_=dynare_estimation(var_list,dname)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2003-2015 Dynare Team % Copyright (C) 2003-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -151,7 +151,7 @@ if nnobs > 1 && horizon > 0
for i = 1:size(var_list,1) for i = 1:size(var_list,1)
if mod(i,nstar) == 1 if mod(i,nstar) == 1
plot_index=plot_index+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; m = 1;
end end
subplot(nr,nc,m) subplot(nr,nc,m)

View File

@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2003-2016 Dynare Team % Copyright (C) 2003-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -542,7 +542,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha
fprintf(fidTeX,' \n'); fprintf(fidTeX,' \n');
end end
for plt = 1:nbplt, for plt = 1:nbplt,
fh = dyn_figure(options_,'Name','Smoothed shocks'); fh = dyn_figure(options_.nodisplay,'Name','Smoothed shocks');
NAMES = []; NAMES = [];
if options_.TeX, TeXNAMES = []; end if options_.TeX, TeXNAMES = []; end
nstar0=min(nstar,M_.exo_nbr-(plt-1)*nstar); 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'); fprintf(fidTeX,' \n');
end end
for plt = 1:nbplt for plt = 1:nbplt
fh = dyn_figure(options_,'Name','Smoothed observation errors'); fh = dyn_figure(options_.nodisplay,'Name','Smoothed observation errors');
NAMES = []; NAMES = [];
if options_.TeX, TeXNAMES = []; end if options_.TeX, TeXNAMES = []; end
nstar0=min(nstar,number_of_plots_to_draw-(nbplt-1)*nstar); 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'); fprintf(fidTeX,' \n');
end end
for plt = 1:nbplt, for plt = 1:nbplt,
fh = dyn_figure(options_,'Name','Historical and smoothed variables'); fh = dyn_figure(options_.nodisplay,'Name','Historical and smoothed variables');
NAMES = []; NAMES = [];
if options_.TeX, TeXNAMES = []; end if options_.TeX, TeXNAMES = []; end
nstar0=min(nstar,n_varobs-(plt-1)*nstar); nstar0=min(nstar,n_varobs-(plt-1)*nstar);

View File

@ -12,7 +12,7 @@ function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width)
% SPECIAL REQUIREMENT % SPECIAL REQUIREMENT
% none % none
% Copyright (C) 2006-2013 Dynare Team % Copyright (C) 2006-2017 Dynare Team
% %
% This file is part of Dynare. % 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_ 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; dyn_graph.figure_name = figure_name;
if nargin > 2 if nargin > 2
dyn_graph.line_types = line_types; dyn_graph.line_types = line_types;

View File

@ -8,7 +8,7 @@ function forecast_graphs(var_list,M_, oo_,options_)
% o oo_ outputs structure % o oo_ outputs structure
% o options_ options structure % o options_ options structure
% Copyright (C) 2008-2016 Dynare Team % Copyright (C) 2008-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -61,7 +61,7 @@ end
m = 1; m = 1;
n_fig = 1; n_fig = 1;
hh=dyn_figure(options_,'Name','Forecasts (I)'); hh=dyn_figure(options_.nodisplay,'Name','Forecasts (I)');
for j= 1:nvar for j= 1:nvar
if m > nc*nr; if m > nc*nr;
dyn_saveas(hh,[ dname '/graphs/forcst' int2str(n_fig)],options_); dyn_saveas(hh,[ dname '/graphs/forcst' int2str(n_fig)],options_);
@ -75,7 +75,7 @@ for j= 1:nvar
fprintf(fidTeX,' \n'); fprintf(fidTeX,' \n');
end end
n_fig =n_fig+1; 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; m = 1;
end end
subplot(nr,nc,m); subplot(nr,nc,m);
@ -125,7 +125,7 @@ if isfield(oo_.forecast,'HPDinf_ME')
m = 1; m = 1;
n_fig = 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) for j= 1:length(var_names)
if m > nc*nr; if m > nc*nr;
dyn_saveas(hh,[ dname '/graphs/forcst_ME' int2str(n_fig)],options_); dyn_saveas(hh,[ dname '/graphs/forcst_ME' int2str(n_fig)],options_);
@ -139,7 +139,7 @@ if isfield(oo_.forecast,'HPDinf_ME')
fprintf(fidTeX,' \n'); fprintf(fidTeX,' \n');
end end
n_fig =n_fig+1; 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; m = 1;
end end
subplot(nr,nc,m); subplot(nr,nc,m);

View File

@ -11,7 +11,7 @@ function []=graph_decomp(z,shock_names,endo_names,i_var,initial_date,DynareModel
% DynareModel [structure] Dynare model structure % DynareModel [structure] Dynare model structure
% DynareOptions [structure] Dynare options structure % DynareOptions [structure] Dynare options structure
% Copyright (C) 2010-2016 Dynare Team % Copyright (C) 2010-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -128,7 +128,7 @@ for j=1:nvar
if ymax-ymin < 1e-6 if ymax-ymin < 1e-6
continue continue
end 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]) set(fhandle,'position' ,[50 50 1500 750])
ax=axes('Position',[0.1 0.1 0.6 0.8],'box','on'); ax=axes('Position',[0.1 0.1 0.6 0.8],'box','on');
% plot(ax,x(2:end),z1(end,:),'k-','LineWidth',2) % plot(ax,x(2:end),z1(end,:),'k-','LineWidth',2)

View File

@ -11,7 +11,7 @@ function []=graph_decomp_detail(z,shock_names,endo_names,i_var,initial_date,Dyna
% DynareModel [structure] Dynare model structure % DynareModel [structure] Dynare model structure
% DynareOptions [structure] Dynare options structure % DynareOptions [structure] Dynare options structure
% Copyright (C) 2010-2016 Dynare Team % Copyright (C) 2010-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -151,7 +151,7 @@ for j=1:nvar
continue continue
end end
for jf = 1:nfigs 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=zeros(1,4);
a0(3)=inf; a0(3)=inf;
a0(4)=-inf; a0(4)=-inf;

View File

@ -14,7 +14,7 @@ function [rmse_MC, ixx] = filt_mc_(OutDir,options_gsa_,dataset_,dataset_info)
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2012-2016 European Commission % Copyright (C) 2012-2016 European Commission
% Copyright (C) 2012-2016 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -407,7 +407,7 @@ else
end end
if mod(i,9)==1, if mod(i,9)==1,
ifig=ifig+1; ifig=ifig+1;
hh=dyn_figure(options_,'name',[temp_name,' ',int2str(ifig)]); hh=dyn_figure(options_.nodisplay,'name',[temp_name,' ',int2str(ifig)]);
end end
subplot(3,3,i-9*(ifig-1)) subplot(3,3,i-9*(ifig-1))
h=cumplot(lnprior(ixx(1:nfilt0(i),i))); h=cumplot(lnprior(ixx(1:nfilt0(i),i)));
@ -455,7 +455,7 @@ else
end end
if mod(i,9)==1, if mod(i,9)==1,
ifig=ifig+1; ifig=ifig+1;
hh = dyn_figure(options_,'Name',[temp_name,' ',int2str(ifig)]); hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
end end
subplot(3,3,i-9*(ifig-1)) subplot(3,3,i-9*(ifig-1))
h=cumplot(likelihood(ixx(1:nfilt0(i),i))); h=cumplot(likelihood(ixx(1:nfilt0(i),i)));
@ -506,7 +506,7 @@ else
end end
if mod(i,9)==1, if mod(i,9)==1,
ifig=ifig+1; ifig=ifig+1;
hh = dyn_figure(options_,'Name',[temp_name,' ',int2str(ifig)]); hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
end end
subplot(3,3,i-9*(ifig-1)) subplot(3,3,i-9*(ifig-1))
h=cumplot(logpo2(ixx(1:nfilt0(i),i))); h=cumplot(logpo2(ixx(1:nfilt0(i),i)));
@ -794,7 +794,7 @@ else
for iy=1:size(vvarvecm,1), for iy=1:size(vvarvecm,1),
ipar = find(any(squeeze(PPV(iy,:,:))<alpha)); ipar = find(any(squeeze(PPV(iy,:,:))<alpha));
for ix=1:ceil(length(ipar)/5), 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), for j=1+5*(ix-1):min(length(ipar),5*ix),
subplot(2,3,j-5*(ix-1)) subplot(2,3,j-5*(ix-1))
%h0=cumplot(x(:,nsnam(j)+nshock)); %h0=cumplot(x(:,nsnam(j)+nshock));
@ -859,7 +859,7 @@ else
% now I plot by individual parameters % now I plot by individual parameters
for ix=1:ceil(length(nsnam)/5), 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), for j=1+5*(ix-1):min(size(snam2,1),5*ix),
subplot(2,3,j-5*(ix-1)) subplot(2,3,j-5*(ix-1))
%h0=cumplot(x(:,nsnam(j)+nshock)); %h0=cumplot(x(:,nsnam(j)+nshock));

View File

@ -5,7 +5,7 @@ function map_calibration(OutputDirectoryName, Model, DynareOptions, DynareResult
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2014-2016 European Commission % Copyright (C) 2014-2016 European Commission
% Copyright (C) 2014-2016 Dynare Team % Copyright (C) 2014-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -191,7 +191,7 @@ if ~isempty(indx_irf),
indx_irf = indx_irf(irestrictions,:); indx_irf = indx_irf(irestrictions,:);
if ~DynareOptions.nograph, 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)); nrow=ceil(sqrt(nbr_irf_couples));
ncol=nrow; ncol=nrow;
if nrow*(nrow-1)>nbr_irf_couples, if nrow*(nrow-1)>nbr_irf_couples,
@ -405,7 +405,7 @@ if ~isempty(indx_moment)
indx_moment = indx_moment(irestrictions,:); indx_moment = indx_moment(irestrictions,:);
if ~DynareOptions.nograph, 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)); nrow=ceil(sqrt(nbr_moment_couples));
ncol=nrow; ncol=nrow;
if nrow*(nrow-1)>nbr_moment_couples, if nrow*(nrow-1)>nbr_moment_couples,

View File

@ -5,7 +5,7 @@ function map_ident_(OutputDirectoryName,opt_gsa)
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2012-2016 European Commission % Copyright (C) 2012-2016 European Commission
% Copyright (C) 2012-2016 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -90,7 +90,7 @@ if opt_gsa.load_ident_files==0,
ifig=0; ifig=0;
for j=1:M_.exo_nbr, for j=1:M_.exo_nbr,
if mod(j,6)==1 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; ifig=ifig+1;
iplo=0; iplo=0;
end end
@ -219,7 +219,7 @@ if opt_gsa.morris==1,
load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAvdec','vdec','ir_vdec','ic_vdec') load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAvdec','vdec','ir_vdec','ic_vdec')
end 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.') % boxplot(SAvdec,'whis',10,'symbol','r.')
myboxplot(SAvdec,[],'.',[],10) myboxplot(SAvdec,[],'.',[],10)
set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) 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') load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'ac','ir_ac','ic_ac')
end 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.') % boxplot(SAcc,'whis',10,'symbol','r.')
myboxplot(SAcc,[],'.',[],10) myboxplot(SAcc,[],'.',[],10)
set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT])
@ -722,7 +722,7 @@ if opt_gsa.morris==1,
else else
load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAnorm','SAmunorm','SAsignorm') load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAnorm','SAmunorm','SAsignorm')
end 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.') % boxplot(SAnorm','whis',10,'symbol','r.')
myboxplot(SAnorm',[],'.',[],10) myboxplot(SAnorm',[],'.',[],10)
set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) 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_); dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morris_par'],options_);
create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_morris_par'],1,'Screening identification: model','morris_par',1) 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.') % % boxplot(SAmunorm','whis',10,'symbol','r.')
% myboxplot(SAmunorm',[],'.',[],10) % myboxplot(SAmunorm',[],'.',[],10)
% set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) % set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT])
@ -754,7 +754,7 @@ if opt_gsa.morris==1,
% title('\mu in the model') % title('\mu in the model')
% dyn_saveas(hh,[OutputDirectoryName,'/',fname_,'_morrismu_par'],options_); % 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.') % % boxplot(SAsignorm','whis',10,'symbol','r.')
% myboxplot(SAsignorm',[],'.',[],10) % myboxplot(SAsignorm',[],'.',[],10)
% set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) % set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT])
@ -1522,7 +1522,7 @@ else, % main effects analysis
% SAmeanexo=mean(SAmomN(:,1:nshock)); % SAmeanexo=mean(SAmomN(:,1:nshock));
% figure, bar(latent'*SAcc), % 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)), bar(sum(SAcc)),
set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT]) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:npT])
set(gca,'xlim',[0.5 npT+0.5]) set(gca,'xlim',[0.5 npT+0.5])

View File

@ -16,7 +16,7 @@ function redform_map(dirname,options_gsa_)
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2012-2016 European Commission % Copyright (C) 2012-2016 European Commission
% Copyright (C) 2012-2016 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % 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 (max(y0)-min(y0))>1.e-10,
if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph, if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph,
ifig=ifig+1; 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; iplo=0;
end end
iplo=iplo+1; iplo=iplo+1;
@ -193,7 +193,7 @@ for j=1:size(anamendo,1)
mkdir(xdir) mkdir(xdir)
end end
if ~options_.nograph, 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); hc = cumplot(y0);
a=axis; delete(hc); a=axis; delete(hc);
% hist(mat_moment{ij}), % hist(mat_moment{ij}),
@ -301,7 +301,7 @@ for j=1:size(anamendo,1)
if (max(y0)-min(y0))>1.e-10, if (max(y0)-min(y0))>1.e-10,
if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph, if mod(iplo,9)==0 && isempty(threshold) && ~options_.nograph,
ifig=ifig+1; 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; iplo=0;
end end
iplo=iplo+1; iplo=iplo+1;
@ -329,7 +329,7 @@ for j=1:size(anamendo,1)
mkdir(xdir) mkdir(xdir)
end end
if ~options_.nograph, 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); hc = cumplot(y0);
a=axis; delete(hc); a=axis; delete(hc);
% hist(mat_moment{ij}), % hist(mat_moment{ij}),
@ -428,7 +428,7 @@ end
if isempty(threshold) && ~options_.nograph, if isempty(threshold) && ~options_.nograph,
if ilog==0, 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.') % boxplot(si','whis',10,'symbol','r.')
myboxplot(si',[],'.',[],10) myboxplot(si',[],'.',[],10)
xlabel(' ') 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') create_TeX_loader(options_,[dirname,filesep,M_.fname,'_redform_gsa'],'Reduced Form GSA','redform_gsa')
else 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.') % boxplot(silog','whis',10,'symbol','r.')
myboxplot(silog',[],'.',[],10) myboxplot(silog',[],'.',[],10)
set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:np]) set(gca,'xticklabel',' ','fontsize',10,'xtick',[1:np])
@ -522,7 +522,7 @@ if iload==0,
y1 = log(y0*isig+lam); y1 = log(y0*isig+lam);
end end
if ~options_.nograph, if ~options_.nograph,
hfig=dyn_figure(options_,'name',options_map.figtitle); hfig=dyn_figure(options_.nodisplay,'name',options_map.figtitle);
subplot(221) subplot(221)
if ilog, if ilog,
hist(y1,30), hist(y1,30),
@ -647,7 +647,7 @@ else
load([fname,'_map.mat'],'gsa_') load([fname,'_map.mat'],'gsa_')
if ~options_.nograph, if ~options_.nograph,
yf = ss_anova_fcast(x0, gsa_); 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],'.'), plot(y0,[yf y0],'.'),
title([namy,' vs ', namx,' pred'],'interpreter','none') title([namy,' vs ', namx,' pred'],'interpreter','none')
dyn_saveas(hfig,[fname '_pred'],options_); dyn_saveas(hfig,[fname '_pred'],options_);
@ -724,7 +724,7 @@ return
function indmcf = redform_mcf(y0, x0, options_mcf, options_) 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, ... [post_mean, post_median, post_var, hpd_interval, post_deciles, ...
density] = posterior_moments(y0,1,0.9); density] = posterior_moments(y0,1,0.9);

View File

@ -11,7 +11,7 @@ function redform_screen(dirname, options_gsa_)
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2012-2016 European Commission % Copyright (C) 2012-2016 European Commission
% Copyright (C) 2012-2016 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -68,7 +68,7 @@ for j=1:size(anamendo,1),
if ~isempty(y0), if ~isempty(y0),
if mod(iplo,9)==0, if mod(iplo,9)==0,
ifig=ifig+1; 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; iplo=0;
end end
iplo=iplo+1; iplo=iplo+1;
@ -110,7 +110,7 @@ for j=1:size(anamendo,1),
if ~isempty(y0), if ~isempty(y0),
if mod(iplo,9)==0, if mod(iplo,9)==0,
ifig=ifig+1; 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; iplo=0;
end end
iplo=iplo+1; iplo=iplo+1;
@ -142,7 +142,7 @@ for j=1:size(anamendo,1),
end end
end end
hh=dyn_figure(options_,'Name','Reduced form screening'); hh=dyn_figure(options_.nodisplay,'Name','Reduced form screening');
%bar(SA) %bar(SA)
% boxplot(SA','whis',10,'symbol','r.') % boxplot(SA','whis',10,'symbol','r.')
myboxplot(SA',[],'.',[],10) myboxplot(SA',[],'.',[],10)

View File

@ -5,7 +5,7 @@ function scatter_mcf(X,Y,vnames,plotsymbol, fnam, dirname, figtitle, xparam1, D
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2014-2016 European Commission % Copyright (C) 2014-2016 European Commission
% Copyright (C) 2014-2016 Dynare Team % Copyright (C) 2014-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -84,7 +84,7 @@ figtitle_tex=strrep(figtitle,'_','\_');
fig_nam_=[fnam]; fig_nam_=[fnam];
if ~nograph, if ~nograph,
hh=dyn_figure(DynareOptions,'name',figtitle); hh=dyn_figure(DynareOptions.nodisplay,'name',figtitle);
end end
bf = 0.1; bf = 0.1;

View File

@ -73,7 +73,7 @@ figtitle_tex=strrep(figtitle,'_','\_');
fig_nam_=[fnam]; fig_nam_=[fnam];
if ~nograph, if ~nograph,
hh=dyn_figure(DynareOptions,'name',figtitle); hh=dyn_figure(DynareOptions.nodisplay,'name',figtitle);
set(hh,'userdata',{X,xp}) set(hh,'userdata',{X,xp})
end end

View File

@ -21,7 +21,7 @@ function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, i
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2012-2016 European Commission % Copyright (C) 2012-2016 European Commission
% Copyright (C) 2012-2016 Dynare Team % Copyright (C) 2012-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -82,7 +82,7 @@ if iplot && ~options_.nograph
ftit=bayestopt_.name(ipar+nshock*(1-ishock)); ftit=bayestopt_.name(ipar+nshock*(1-ishock));
for i=1:ceil(nparplot/12), 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), for j=1+12*(i-1):min(nparplot,12*i),
subplot(3,4,j-12*(i-1)) subplot(3,4,j-12*(i-1))
if ~isempty(ibehaviour), if ~isempty(ibehaviour),

View File

@ -6,7 +6,7 @@ function indcorr = stab_map_2(x,alpha2, pvalue_crit, fnam, dirname,xparam1,figti
% marco.ratto@ec.europa.eu % marco.ratto@ec.europa.eu
% Copyright (C) 2011-2016 European Commission % Copyright (C) 2011-2016 European Commission
% Copyright (C) 2011-2016 Dynare Team % Copyright (C) 2011-2017 Dynare Team
% This file is part of Dynare. % This file is part of Dynare.
% %
% Dynare is free software: you can redistribute it and/or modify % Dynare is free software: you can redistribute it and/or modify
@ -119,7 +119,7 @@ for j=1:npar,
if ~nograph, if ~nograph,
if mod(j2,12)==1, if mod(j2,12)==1,
ifig=ifig+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 end
subplot(3,4,j2-(ifig-1)*12) subplot(3,4,j2-(ifig-1)*12)
% bar(c0(i2,j)), % bar(c0(i2,j)),

View File

@ -18,7 +18,7 @@ function mh_autocorrelation_function(options_,M_,estim_params_,type,blck,name1,n
% %
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% Copyright (C) 2003-2013 Dynare Team % Copyright (C) 2003-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -91,7 +91,7 @@ if options_.mh_nblck>1
FigureName = [ FigureName , ' (block number' int2str(blck) ').']; FigureName = [ FigureName , ' (block number' int2str(blck) ').'];
end end
hh=dyn_figure(options_,'Name',FigureName); hh=dyn_figure(options_.nodisplay,'Name',FigureName);
bar(0:options_.mh_autocorrelation_function_size,autocor,'k'); bar(0:options_.mh_autocorrelation_function_size,autocor,'k');
axis tight axis tight

View File

@ -40,7 +40,7 @@ function mode_check(fun,x,hessian_mat,DynareDataset,DatasetInfo,DynareOptions,Mo
%! @end deftypefn %! @end deftypefn
%@eod: %@eod:
% Copyright (C) 2003-2016 Dynare Team % Copyright (C) 2003-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -96,7 +96,7 @@ for plt = 1:nbplt,
NAMES = []; NAMES = [];
TeXNAMES = []; TeXNAMES = [];
end 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) for k=1:min(nstar,length(x)-(plt-1)*nstar)
subplot(nr,nc,k) subplot(nr,nc,k)
kk = (plt-1)*nstar+k; kk = (plt-1)*nstar+k;

@ -1 +1 @@
Subproject commit 79b42ec947aa1dbe009778f3874f074f0d14eb7a Subproject commit 20978ce117597f2ce83afb2fbcd92347ee1642d1

View File

@ -10,7 +10,7 @@ function plot_icforecast(Variables,periods,options_)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% This routine has to be called after imcforecast.m. % 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. % This file is part of Dynare.
% %
@ -57,7 +57,7 @@ for i=1:size(Variables,1)
end end
function build_figure(name,cci1,cci2,mm1,mm2,options_,graphoptions) 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); H = length(mm1);
h1 = area(1:H,cci1(2,1:H),'BaseValue',min([min(cci1(1,:)),min(cci2(1,:))]),'FaceColor',[.9 .9 .9]); h1 = area(1:H,cci1(2,1:H),'BaseValue',min([min(cci1(1,:)),min(cci2(1,:))]),'FaceColor',[.9 .9 .9]);
hold on hold on

View File

@ -19,7 +19,7 @@ function plot_identification(params,idemoments,idehess,idemodel, idelre, advance
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% None % None
% Copyright (C) 2008-2016 Dynare Team % Copyright (C) 2008-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -60,7 +60,7 @@ tittxt1=regexprep(tittxt, ' ', '_');
tittxt1=strrep(tittxt1, '.', ''); tittxt1=strrep(tittxt1, '.', '');
if SampleSize == 1, if SampleSize == 1,
siJ = idemoments.siJ; 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) subplot(211)
mmm = (idehess.ide_strength_J); mmm = (idehess.ide_strength_J);
[ss, is] = sort(mmm); [ss, is] = sort(mmm);
@ -132,7 +132,7 @@ if SampleSize == 1,
if all(isnan([siJnorm';siHnorm';siLREnorm'])) 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') fprintf('\nIDENTIFICATION: Skipping sensitivity plot, because standard deviation of parameters is NaN, possibly due to the use of ML.\n')
else else
hh = dyn_figure(options_,'Name',[tittxt, ' - Sensitivity plot']); hh = dyn_figure(options_.nodisplay,'Name',[tittxt, ' - Sensitivity plot']);
subplot(211) subplot(211)
mmm = (siJnorm)'./max(siJnorm); mmm = (siJnorm)'./max(siJnorm);
mmm1 = (siHnorm)'./max(siHnorm); mmm1 = (siHnorm)'./max(siHnorm);
@ -185,7 +185,7 @@ if SampleSize == 1,
end end
% fprintf('%-15s [%s] %10.3f\n',name{i},namx,idemoments.cosnJ(i,j)) % fprintf('%-15s [%s] %10.3f\n',name{i},namx,idemoments.cosnJ(i,j))
end 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]); imagesc(pax,[0 1]);
set(gca,'xticklabel','') set(gca,'xticklabel','')
set(gca,'yticklabel','') set(gca,'yticklabel','')
@ -225,24 +225,24 @@ if SampleSize == 1,
S=diag(S); S=diag(S);
if idehess.flag_score, if idehess.flag_score,
if nparam<5, 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)']; tex_tit_1=[tittxt,' - Identification patterns (Information matrix)'];
else 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']; 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']; tex_tit_2=[tittxt,' - Identification patterns (Information matrix): HIGHEST SV'];
end end
else else
% S = idemoments.S; % S = idemoments.S;
% V = idemoments.V; % V = idemoments.V;
if nparam<5, 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)']; tex_tit_1=[tittxt,' - Identification patterns (moments Information matrix)'];
else 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']; 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']; tex_tit_2=[tittxt,' - Identification patterns (moments Information matrix): HIGHEST SV'];
end end
end end
@ -303,7 +303,7 @@ if SampleSize == 1,
end end
else else
hh = dyn_figure(options_,'Name',['MC sensitivities']); hh = dyn_figure(options_.nodisplay,'Name',['MC sensitivities']);
subplot(211) subplot(211)
mmm = (idehess.ide_strength_J); mmm = (idehess.ide_strength_J);
[ss, is] = sort(mmm); [ss, is] = sort(mmm);
@ -350,7 +350,7 @@ else
disp('Press ENTER to display advanced diagnostics'), pause(5), disp('Press ENTER to display advanced diagnostics'), pause(5),
end end
% options_.nograph=1; % options_.nograph=1;
hh = dyn_figure(options_,'Name','MC Condition Number'); hh = dyn_figure(options_.nodisplay,'Name','MC Condition Number');
subplot(221) subplot(221)
hist(log10(idemodel.cond)) hist(log10(idemodel.cond))
title('log10 of Condition number in the model') title('log10 of Condition number in the model')
@ -398,12 +398,12 @@ else
% end % end
if nparam<5, 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']; tex_tit_1=[tittxt,' - MC Identification patterns (moments): HIGHEST SV'];
else 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']; 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']; tex_tit_2=[tittxt,' - MC Identification patterns (moments): HIGHEST SV'];
end end
nplots=min(nparam,8); nplots=min(nparam,8);

View File

@ -13,7 +13,7 @@ function plot_priors(bayestopt_,M_,estim_params_,options_)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% None % None
% Copyright (C) 2004-2016 Dynare Team % Copyright (C) 2004-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -43,7 +43,7 @@ if TeX && any(strcmp('eps',cellstr(options_.graph_format)))
fprintf(fidTeX,' \n'); fprintf(fidTeX,' \n');
end end
for plt = 1:nbplt, for plt = 1:nbplt,
hplt = dyn_figure(options_,'Name',figurename); hplt = dyn_figure(options_.nodisplay,'Name',figurename);
if TeX if TeX
TeXNAMES = []; TeXNAMES = [];
NAMES = []; NAMES = [];

View File

@ -13,7 +13,7 @@ function myoutput=pm3_core(myinputs,fpar,nvar,whoiam, ThisMatlab)
% SPECIAL REQUIREMENTS. % SPECIAL REQUIREMENTS.
% None. % None.
% Copyright (C) 2007-2016 Dynare Team % Copyright (C) 2007-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -64,7 +64,7 @@ end
figunumber = 0; figunumber = 0;
subplotnum = 0; subplotnum = 0;
hh = dyn_figure(options_,'Name',[tit1 ' ' int2str(figunumber+1)]); hh = dyn_figure(options_.nodisplay,'Name',[tit1 ' ' int2str(figunumber+1)]);
RemoteFlag = 0; RemoteFlag = 0;
if whoiam, if whoiam,
if Parallel(ThisMatlab).Local ==0 if Parallel(ThisMatlab).Local ==0
@ -115,7 +115,7 @@ for i=fpar:nvar
subplotnum = 0; subplotnum = 0;
figunumber = figunumber+1; figunumber = figunumber+1;
if (i ~= nvar) if (i ~= nvar)
hh = dyn_figure(options_,'Name',[name3 ' ' int2str(figunumber+1)]); hh = dyn_figure(options_.nodisplay,'Name',[name3 ' ' int2str(figunumber+1)]);
end end
end end

View File

@ -14,7 +14,7 @@ function rplot(s1)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2001-2016 Dynare Team % Copyright (C) 2001-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -81,7 +81,7 @@ if rplottype == 0
for j = 1:size(y,1) for j = 1:size(y,1)
t = [t s1(j,:) ' '] ; t = [t s1(j,:) ' '] ;
end end
hh=dyn_figure(options_,'Name',['Simulated Trajectory']); hh=dyn_figure(options_.nodisplay,'Name',['Simulated Trajectory']);
plot(ix(i),y(:,i)) ; plot(ix(i),y(:,i)) ;
title (t,'Interpreter','none') ; title (t,'Interpreter','none') ;
xlabel('Periods') ; xlabel('Periods') ;
@ -100,7 +100,7 @@ if rplottype == 0
end end
elseif rplottype == 1 elseif rplottype == 1
for j = 1:size(y,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)) ; plot(ix(i),y(j,i)) ;
xlim([min(ix(i)) max(ix(i))]) xlim([min(ix(i)) max(ix(i))])
title(['Plot of ' s1(j,:)],'Interpreter','none') ; title(['Plot of ' s1(j,:)],'Interpreter','none') ;
@ -111,7 +111,7 @@ elseif rplottype == 1
end end
end end
elseif rplottype == 2 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)) ; nl = max(1,fix(size(y,1)/4)) ;
nc = ceil(size(y,1)/nl) ; nc = ceil(size(y,1)/nl) ;
for j = 1:size(y,1) for j = 1:size(y,1)

View File

@ -1,6 +1,6 @@
function info=stoch_simul(var_list) function info=stoch_simul(var_list)
% Copyright (C) 2001-2016 Dynare Team % Copyright (C) 2001-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -253,10 +253,10 @@ if options_.irf
if nbplt == 0 if nbplt == 0
elseif nbplt == 1 elseif nbplt == 1
if options_.relative_irf 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,:)]); ' orthogonalized shock to ' tit(i,:)]);
else else
hh = dyn_figure(options_,'Name',['Orthogonalized shock to' ... hh = dyn_figure(options_.nodisplay,'Name',['Orthogonalized shock to' ...
' ' tit(i,:)]); ' ' tit(i,:)]);
end end
for j = 1:number_of_plots_to_draw for j = 1:number_of_plots_to_draw
@ -285,10 +285,10 @@ if options_.irf
else else
for fig = 1:nbplt-1 for fig = 1:nbplt-1
if options_.relative_irf 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)]); ' to ' tit(i,:) ' figure ' int2str(fig)]);
else 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)]); ' figure ' int2str(fig)]);
end end
for plt = 1:nstar for plt = 1:nstar
@ -321,7 +321,7 @@ if options_.irf
fprintf(fidTeX,' \n'); fprintf(fidTeX,' \n');
end end
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; m = 0;
for plt = 1:number_of_plots_to_draw-(nbplt-1)*nstar; for plt = 1:number_of_plots_to_draw-(nbplt-1)*nstar;
m = m+1; m = m+1;

View File

@ -18,7 +18,7 @@ function trace_plot(options_,M_,estim_params_,type,blck,name1,name2)
% %
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% Copyright (C) 2003-2016 Dynare Team % Copyright (C) 2003-2017 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -95,7 +95,7 @@ if options_.mh_nblck>1
FigureName = [ FigureName , ' (block number ' int2str(blck) ').']; FigureName = [ FigureName , ' (block number ' int2str(blck) ').'];
end end
hh=dyn_figure(options_,'Name',FigureName); hh=dyn_figure(options_.nodisplay,'Name',FigureName);
plot(1:TotalNumberOfMhDraws,PosteriorDraws,'Color',[.7 .7 .7]); plot(1:TotalNumberOfMhDraws,PosteriorDraws,'Color',[.7 .7 .7]);