diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m
index 8c067d2d718be06d88cca7f74fb78e311103e52a..bef0fecf965963d67b9f71e40feebb90216384ea 100644
--- a/matlab/dynare_estimation_init.m
+++ b/matlab/dynare_estimation_init.m
@@ -124,7 +124,7 @@ if ~isempty(estim_params_)
     [xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);
     if any(bayestopt_.pshape > 0)
         % Plot prior densities.
-        if options_.plot_priors
+        if ~options_.nograph && options_.plot_priors
             plot_priors(bayestopt_,M_,options_)
         end
         % Set prior bounds