TeX formatting.
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@644 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
b40f43ddf9
commit
f090d02f9b
|
@ -2,7 +2,7 @@ function PlotPosteriorDistributions()
|
|||
% stephane.adjemian@ens.fr [09-09-2005]
|
||||
global estim_params_ M_ options_ bayestopt_ oo_
|
||||
|
||||
DirectoryName = CheckPath('Plots/Densities');
|
||||
OutputDirectoryName = CheckPath('Output');
|
||||
|
||||
TeX = options_.TeX;
|
||||
nblck = options_.mh_nblck;
|
||||
|
@ -19,7 +19,7 @@ nn = sqrt(MaxNumberOfPlotPerFigure);
|
|||
figurename = 'Priors and posteriors';
|
||||
|
||||
if TeX
|
||||
fidTeX = fopen([DirectoryName '/' M_.fname '_PriorsAndPosteriors.TeX'],'w');
|
||||
fidTeX = fopen([OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors.TeX'],'w');
|
||||
fprintf(fidTeX,'%% TeX eps-loader file generated by PlotPosteriorDistributions.m (Dynare).\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0) '\n']);
|
||||
fprintf(fidTeX,' \n');
|
||||
|
@ -27,12 +27,17 @@ end
|
|||
|
||||
figunumber = 0;
|
||||
subplotnum = 0;
|
||||
|
||||
for i=1:npar
|
||||
subplotnum = subplotnum+1;
|
||||
if subplotnum == 1
|
||||
figunumber = figunumber+1;
|
||||
hfig = figure('Name',figurename);
|
||||
end
|
||||
if options_.nograph
|
||||
hfig = figure('Name',figurename,'Visible','off');
|
||||
else
|
||||
hfig = figure('Name',figurename);
|
||||
end
|
||||
end
|
||||
if subplotnum == 1
|
||||
if TeX
|
||||
TeXNAMES = [];
|
||||
|
@ -47,10 +52,10 @@ for i=1:npar
|
|||
[x2,f2,abscissa,dens,binf2,bsup2] = draw_prior_density(i);
|
||||
top2 = max(f2);
|
||||
if i <= nvx
|
||||
name = deblank(M_.exo_names(estim_params_.var_exo(i,1),:));
|
||||
name = deblank(M_.exo_names(estim_params_.var_exo(i,1),:));
|
||||
eval(['x1 = oo_.posterior_density.shocks_std.' name '(:,1);'])
|
||||
eval(['f1 = oo_.posterior_density.shocks_std.' name '(:,2);'])
|
||||
eval(['pmode = oo_.posterior_mode.shocks_std.' name ';'])
|
||||
eval(['f1 = oo_.posterior_density.shocks_std.' name '(:,2);'])
|
||||
eval(['pmode = oo_.posterior_mode.shocks_std.' name ';'])
|
||||
elseif i <= nvx+nvn
|
||||
name = deblank(options_.varobs(estim_params_.var_endo(i-nvx,1),:));
|
||||
eval(['x1 = oo_.posterior_density.measurement_errors_std.' name '(:,1);'])
|
||||
|
@ -97,9 +102,9 @@ for i=1:npar
|
|||
hold off;
|
||||
drawnow
|
||||
if subplotnum == MaxNumberOfPlotPerFigure | i == npar;
|
||||
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
|
||||
eval(['print -dpdf ' DirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
|
||||
saveas(hfig,[DirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber) '.fig']);
|
||||
eval(['print -depsc2 ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
|
||||
eval(['print -dpdf ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
|
||||
saveas(hfig,[OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber) '.fig']);
|
||||
if TeX
|
||||
fprintf(fidTeX,'\\begin{figure}[H]\n');
|
||||
for j = 1:size(NAMES,1)
|
||||
|
|
Loading…
Reference in New Issue