diff --git a/matlab/MakeAllFigures.m b/matlab/MakeAllFigures.m index ac8fcf7c7..c1ebb7ccd 100644 --- a/matlab/MakeAllFigures.m +++ b/matlab/MakeAllFigures.m @@ -148,19 +148,19 @@ end if Info.SaveFormat.Eps if isempty(Info.SaveFormat.Name) - eval(['print -depsc2 ' M_.fname Info.SaveFormat.GenericName int2str(Info.SaveFormat.Number)]); + eval(['print -depsc2 ' M_.fname Info.SaveFormat.GenericName int2str(Info.SaveFormat.Number) '.eps']); else - eval(['print -depsc2 ' M_.fname Info.SaveFormat.GenericName Info.SaveFormat.Name]); + eval(['print -depsc2 ' M_.fname Info.SaveFormat.GenericName Info.SaveFormat.Name '.eps']); end end -if Info.SaveFormat.Pdf +if Info.SaveFormat.Pdf && ~exist('OCTAVE_VERSION') if isempty(Info.SaveFormat.Name) eval(['print -dpdf ' M_.fname Info.SaveFormat.GenericName int2str(Info.SaveFormat.Number)]); else eval(['print -dpdf ' M_.fname Info.SaveFormat.GenericName Info.SaveFormat.Name]); end end -if Info.SaveFormat.Fig +if Info.SaveFormat.Fig && ~exist('OCTAVE_VERSION') if isempty(Info.SaveFormat.Name) saveas(FigHandle,[M_.fname Info.SaveFormat.GenericName int2str(Info.SaveFormat.Number) '.fig']); else diff --git a/matlab/PosteriorIRF.m b/matlab/PosteriorIRF.m index 8a811e5cb..060dc7872 100644 --- a/matlab/PosteriorIRF.m +++ b/matlab/PosteriorIRF.m @@ -463,9 +463,11 @@ for i=1:M_.exo_nbr if subplotnum == MaxNumberOfPlotPerFigure | (j == nvar & subplotnum> 0) figunumber = figunumber+1; set(hh,'visible','on') - eval(['print -depsc2 ' DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber)]); - eval(['print -dpdf ' DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber)]); - saveas(hh,[DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber) '.fig']); + eval(['print -depsc2 ' DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber) '.eps']); + if ~exist('OCTAVE_VERSION') + eval(['print -dpdf ' DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber)]); + saveas(hh,[DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber) '.fig']); + end set(hh,'visible','off') if options_.nograph, close(hh), end if options_.TeX diff --git a/matlab/mode_check.m b/matlab/mode_check.m index fc2ded652..2f67cad38 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -90,9 +90,11 @@ if nbplt == 1 hold off drawnow end - eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(1)]); - eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(1)]); - saveas(hh,[M_.fname '_CheckPlots' int2str(1) '.fig']); + eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(1) '.eps' ]); + if ~exist('OCTAVE_VERSION') + eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(1)]); + saveas(hh,[M_.fname '_CheckPlots' int2str(1) '.fig']); + end if options_.nograph, close(hh), end % TeX eps loader file if TeX @@ -145,9 +147,11 @@ else hold off drawnow end - eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(plt)]); - eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(plt)]); - saveas(hh,[M_.fname '_CheckPlots' int2str(plt) '.fig']); + eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(plt) '.eps']); + if ~exist('OCTAVE_VERSION') + eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(plt)]); + saveas(hh,[M_.fname '_CheckPlots' int2str(plt) '.fig']); + end if options_.nograph, close(hh), end if TeX % TeX eps loader file @@ -203,9 +207,11 @@ else k = k + 1; drawnow end - eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(nbplt)]); - eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(nbplt)]); - saveas(hh,[M_.fname '_CheckPlots' int2str(nbplt) '.fig']); + eval(['print -depsc2 ' M_.fname '_CheckPlots' int2str(nbplt) '.eps']); + if ~exist('OCTAVE_VERSION') + eval(['print -dpdf ' M_.fname '_CheckPlots' int2str(nbplt)]); + saveas(hh,[M_.fname '_CheckPlots' int2str(nbplt) '.fig']); + end if options_.nograph, close(hh), end if TeX fprintf(fidTeX,'\\begin{figure}[H]\n');