From 28d4ed19180aea81fc0ba422a602d9d803424f20 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Tue, 20 Dec 2016 13:57:27 +0100 Subject: [PATCH] Finish implementation and documentation of nograph option of shock_decomposition.m --- doc/dynare.texi | 5 +++++ matlab/global_initialization.m | 4 +--- matlab/shock_decomposition.m | 4 +++- preprocessor/DynareBison.yy | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index f47cd38eb..ce6ea6172 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -7030,6 +7030,11 @@ the decomposition. Groups of shocks are defined in @xref{shock_groups} block. @item colormap = @var{COLORMAP_NAME} @anchor{colormap}. Controls the colormap used for the shocks decomposition graphs. See @code{colormap} in Matlab/Octave manual. + +@item nograph +@xref{nograph}. Suppresses the display and creation only within the @code{shock_decomposition}-command +but does not affect other commands. + @end table @vindex oo_.shock_decomposition diff --git a/matlab/global_initialization.m b/matlab/global_initialization.m index 2f8eec361..d409232a6 100644 --- a/matlab/global_initialization.m +++ b/matlab/global_initialization.m @@ -134,6 +134,7 @@ options_.graphics.line_width = 1; options_.graph_format = 'eps'; options_.nodisplay = 0; options_.nograph = 0; +options_.no_graph.shock_decomposition = 0; options_.XTick = []; options_.XTickLabel = []; options_.console_mode = 0; @@ -790,9 +791,6 @@ options_.mcppath.mu0 = []; %Figure options options_.figures.textwidth=0.8; -% Shock decomposition options -options_.shock_decomp.nograph = 0; - % initialize persistent variables in priordens() priordens([],[],[],[],[],[],1); % initialize persistent variables in dyn_first_order_solver() diff --git a/matlab/shock_decomposition.m b/matlab/shock_decomposition.m index aa61c9b88..f3c264edc 100644 --- a/matlab/shock_decomposition.m +++ b/matlab/shock_decomposition.m @@ -139,4 +139,6 @@ else shock_names = M_.exo_names; end -graph_decomp(z,shock_names,M_.endo_names,i_var,options_.initial_date,M_,options_) +if ~options_.no_graph.shock_decomposition + graph_decomp(z,shock_names,M_.endo_names,i_var,options_.initial_date,M_,options_) +end \ No newline at end of file diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index b11895514..03e4b8446 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -2816,7 +2816,7 @@ o_nograph : NOGRAPH | GRAPH { driver.option_num("nograph", "0"); } ; -o_shock_decomposition_nograph : NOGRAPH { driver.option_num("shock_decomp.nograph", "1"); } +o_shock_decomposition_nograph : NOGRAPH { driver.option_num("no_graph.shock_decomposition", "1"); } o_nodisplay : NODISPLAY { driver.option_num("nodisplay","1"); }; o_graph_format : GRAPH_FORMAT EQUAL allowed_graph_formats { driver.process_graph_format_option(); }