From db985026b3722b0c4a7c6d540bf7ad1384751653 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 29 Nov 2012 14:26:39 +0100
Subject: [PATCH] Support nograph option for posterior distribution plots
 (cherry picked from commit c06bd0ae75891b45d952fde716e5e138bbabead4)

---
 matlab/dynare_estimation_1.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m
index 4f4fa37f3..fdcda8009 100644
--- a/matlab/dynare_estimation_1.m
+++ b/matlab/dynare_estimation_1.m
@@ -900,7 +900,9 @@ if (any(bayestopt_.pshape  >0 ) && options_.mh_replic) || ...
         if options_.mh_replic
             [marginal,oo_] = marginal_density(M_, options_, estim_params_, oo_);
             oo_ = GetPosteriorParametersStatistics(estim_params_, M_, options_, bayestopt_, oo_);
-            oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt_, oo_);
+            if ~options_.nograph
+                oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt_, oo_);
+            end
             [oo_.posterior.metropolis.mean,oo_.posterior.metropolis.variance] ...
                 = GetPosteriorMeanVariance(M_,options_.mh_drop);
         else
-- 
GitLab