diff --git a/doc/dynare.texi b/doc/dynare.texi
index 4b5ffbb6a4fd81cd1411e5f4f1499f250a41deb2..2b143dd92ad22fcc85a44320b0dab7ebb416f6d0 100644
--- a/doc/dynare.texi
+++ b/doc/dynare.texi
@@ -743,6 +743,10 @@ Activate console mode. In addition to the behavior of
 @code{nodisplay}, Dynare will not use graphical waitbars for long
 computations.
 
+@item nograph
+Activate the @code{nograph} option (@xref{nograph}), so that Dynare will not produce any
+graph
+
 @item cygwin
 Tells Dynare that your MATLAB is configured for compiling MEX files with
 Cygwin (@pxref{Software requirements}). This option is only available
diff --git a/preprocessor/DynareMain.cc b/preprocessor/DynareMain.cc
index 79201e391195f399be7c3bc833d7a19c3bfd50d6..b05740086bf4e6654b91a68059a5ea44ec95589d 100644
--- a/preprocessor/DynareMain.cc
+++ b/preprocessor/DynareMain.cc
@@ -36,7 +36,7 @@ using namespace std;
    Splitting main() in two parts was necessary because ParsingDriver.h and MacroDriver.h can't be
    included simultaneously (because of Bison limitations).
 */
-void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console,
+void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console, bool nograph,
            bool parallel, const string &parallel_config_file, const string &cluster_name, bool parallel_slave_open_mode,
            bool parallel_test
 #if defined(_WIN32) || defined(__CYGWIN32__)
@@ -48,7 +48,7 @@ void
 usage()
 {
   cerr << "Dynare usage: dynare mod_file [debug] [noclearall] [savemacro[=macro_file]] [onlymacro] [nolinemacro] [notmpterms] [nolog] [warn_uninit]"
-       << " [console] [parallel[=cluster_name]] [conffile=parallel_config_path_and_filename] [parallel_slave_open_mode] [parallel_test] "
+       << " [console] [nograph] [parallel[=cluster_name]] [conffile=parallel_config_path_and_filename] [parallel_slave_open_mode] [parallel_test] "
        << " [-D<variable>[=<value>]]"
 #if defined(_WIN32) || defined(__CYGWIN32__)
        << " [cygwin] [msvc]"
@@ -84,6 +84,7 @@ main(int argc, char **argv)
   bool no_warn = false;
   bool warn_uninit = false;
   bool console = false;
+  bool nograph = false;
 #if defined(_WIN32) || defined(__CYGWIN32__)
   bool cygwin = false;
   bool msvc = false;
@@ -129,6 +130,8 @@ main(int argc, char **argv)
         warn_uninit = true;
       else if (!strcmp(argv[arg], "console"))
         console = true;
+      else if (!strcmp(argv[arg], "nograph"))
+        nograph = true;
 #if defined(_WIN32) || defined(__CYGWIN32__)
       else if (!strcmp(argv[arg], "cygwin"))
         cygwin = true;
@@ -221,7 +224,7 @@ main(int argc, char **argv)
     return EXIT_SUCCESS;
 
   // Do the rest
-  main2(macro_output, basename, debug, clear_all, no_tmp_terms, no_log, no_warn, warn_uninit, console,
+  main2(macro_output, basename, debug, clear_all, no_tmp_terms, no_log, no_warn, warn_uninit, console, nograph,
         parallel, parallel_config_file, cluster_name, parallel_slave_open_mode, parallel_test
 #if defined(_WIN32) || defined(__CYGWIN32__)
         , cygwin, msvc
diff --git a/preprocessor/DynareMain2.cc b/preprocessor/DynareMain2.cc
index f50436f5cb288814659184a492a6663b2216c1cb..5927896c4c43ba0bac33c234bca35173fd104062 100644
--- a/preprocessor/DynareMain2.cc
+++ b/preprocessor/DynareMain2.cc
@@ -26,7 +26,7 @@ using namespace std;
 #include "ConfigFile.hh"
 
 void
-main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console,
+main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console, bool nograph,
       bool parallel, const string &parallel_config_file, const string &cluster_name, bool parallel_slave_open_mode,
       bool parallel_test
 #if defined(_WIN32) || defined(__CYGWIN32__)
@@ -58,7 +58,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tm
   mod_file->computingPass(no_tmp_terms);
 
   // Write outputs
-  mod_file->writeOutputFiles(basename, clear_all, no_log, no_warn, console, config_file
+  mod_file->writeOutputFiles(basename, clear_all, no_log, no_warn, console, nograph, config_file
 #if defined(_WIN32) || defined(__CYGWIN32__)
                              , cygwin, msvc
 #endif
diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index d8a6e2c1ef23d929735c8e17fd49c66b49ac37ca..c2b10732e193646fc81af73253dd0ea3250c9863 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -455,7 +455,7 @@ ModFile::computingPass(bool no_tmp_terms)
 }
 
 void
-ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, bool no_warn, bool console, const ConfigFile &config_file
+ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, bool no_warn, bool console, bool nograph, const ConfigFile &config_file
 #if defined(_WIN32) || defined(__CYGWIN32__)
                           , bool cygwin, bool msvc
 #endif
@@ -509,7 +509,9 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, b
   if (console)
     mOutputFile << "options_.console_mode = 1;" << endl
                 << "options_.nodisplay = 1;" << endl;
-
+  if (nograph)
+    mOutputFile << "options_.nograph = 1;" << endl;
+    
   cout << "Processing outputs ...";
 
   symbol_table.writeOutput(mOutputFile);
diff --git a/preprocessor/ModFile.hh b/preprocessor/ModFile.hh
index aa7ccc61657a37bcc4ed53dea0f16b47651eef27..a10b90e8990357df13f34326046b4ab8383607af 100644
--- a/preprocessor/ModFile.hh
+++ b/preprocessor/ModFile.hh
@@ -127,10 +127,11 @@ public:
     \param basename The base name used for writing output files. Should be the name of the mod file without its extension
     \param clear_all Should a "clear all" instruction be written to output ?
     \param console Are we in console mode ?
+    \param nograph Should we build the figures?
     \param cygwin Should the MEX command of use_dll be adapted for Cygwin?
     \param msvc Should the MEX command of use_dll be adapted for MSVC?
   */
-  void writeOutputFiles(const string &basename, bool clear_all, bool no_log, bool no_warn, bool console, const ConfigFile &config_file
+  void writeOutputFiles(const string &basename, bool clear_all, bool no_log, bool no_warn, bool console, bool nograph, const ConfigFile &config_file
 #if defined(_WIN32) || defined(__CYGWIN32__)
                         , bool cygwin, bool msvc
 #endif