Add LaTeX-capacities for trace_plot.m
parent
f9436350f1
commit
837916f45b
|
@ -129,5 +129,41 @@ if strcmpi(type,'PosteriorDensity')
|
|||
else
|
||||
plot_name=get_the_name(column,0,M_,estim_params_,options_);
|
||||
end
|
||||
|
||||
dyn_saveas(hh,[M_.fname, filesep, 'graphs', filesep, 'TracePlot_' plot_name],options_)
|
||||
|
||||
if options_.TeX
|
||||
fid=fopen([M_.fname,'/graphs/',M_.fname,'_TracePlot_' plot_name,'.TeX'],'w+');
|
||||
|
||||
if strcmpi(type,'DeepParameter')
|
||||
tex_names=M_.param_names_tex;
|
||||
base_names=M_.param_names;
|
||||
elseif strcmpi(type,'StructuralShock')
|
||||
tex_names=M_.exo_names_tex;
|
||||
base_names=M_.exo_names;
|
||||
elseif strcmpi(type,'MeasurementError')
|
||||
tex_names=M_.endo_names_tex;
|
||||
base_names=M_.endo_names;
|
||||
end
|
||||
|
||||
if strcmpi(type,'PosteriorDensity')
|
||||
FigureName = ['Trace plot for ' TYPE name1];
|
||||
else
|
||||
if nargin<7
|
||||
FigureName = ['Trace plot for ' TYPE '$' deblank(tex_names(strmatch(name1,base_names,'exact'),:)) '$'];
|
||||
else
|
||||
FigureName = ['Trace plot for ' TYPE '$' deblank(tex_names(strmatch(name1,base_names,'exact'),:)) '$ and $' deblank(tex_names(strmatch(name2,base_names,'exact'),:)) '$'];
|
||||
end
|
||||
end
|
||||
if options_.mh_nblck>1
|
||||
FigureName = [ FigureName , ' (block number ' int2str(blck) ').'];
|
||||
end
|
||||
|
||||
fprintf(fid,'%-s\n','\begin{figure}[H]');
|
||||
fprintf(fid,'%-s\n','\centering');
|
||||
fprintf(fid,'%-s\n',[' \includegraphics[scale=0.5]{',[M_.fname, '/graphs/TracePlot_' plot_name],'}\\']);
|
||||
fprintf(fid,'%-s\n',[' \caption{',FigureName,'}']);
|
||||
fprintf(fid,'%-s\n','\end{figure}');
|
||||
fclose(fid);
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue