Commit 3863a743 authored by Sébastien Villemot's avatar Sébastien Villemot

Fix bug introduced in 13ce9186 in graph decomposition under MATLAB

parent cb46a269
...@@ -52,7 +52,7 @@ fig_name_long = opts_decomp.fig_name; ...@@ -52,7 +52,7 @@ fig_name_long = opts_decomp.fig_name;
use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
screen_shocks = opts_decomp.screen_shocks; screen_shocks = opts_decomp.screen_shocks;
if use_shock_groups | comp_nbr<=18 if ~isempty(use_shock_groups) || comp_nbr<=18
screen_shocks=0; screen_shocks=0;
end end
if use_shock_groups if use_shock_groups
...@@ -189,7 +189,7 @@ for j=1:nvar ...@@ -189,7 +189,7 @@ for j=1:nvar
hold on hold on
ht = text(0.3,y1+0.3*height,labels(i,:),'Interpreter','none'); ht = text(0.3,y1+0.3*height,labels(i,:),'Interpreter','none');
hold on hold on
if interactive && (~isoctave && use_shock_groups) if interactive && (~isoctave && ~isempty(use_shock_groups))
mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end); mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end);
mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
mydata.shock_group = shock_groups.(shock_ind{i}); mydata.shock_group = shock_groups.(shock_ind{i});
......
...@@ -52,7 +52,7 @@ if ~isempty(opts_decomp.type) ...@@ -52,7 +52,7 @@ if ~isempty(opts_decomp.type)
fig_mode = [fig_mode '_']; fig_mode = [fig_mode '_'];
end end
screen_shocks = opts_decomp.screen_shocks; screen_shocks = opts_decomp.screen_shocks;
if DynareOptions.plot_shock_decomp.use_shock_groups | comp_nbr<=18 if ~isempty(DynareOptions.plot_shock_decomp.use_shock_groups) || comp_nbr<=18
screen_shocks=0; screen_shocks=0;
end end
fig_name_long = opts_decomp.fig_name; fig_name_long = opts_decomp.fig_name;
...@@ -191,7 +191,7 @@ for j=1:nvar ...@@ -191,7 +191,7 @@ for j=1:nvar
a0(4)=max(a(4),a0(4)); a0(4)=max(a(4),a0(4));
set(gca,'ylim',a0(3:4)) set(gca,'ylim',a0(3:4))
hold on, h1=plot(x(2:end),z1(end,:),'k-','LineWidth',2); hold on, h1=plot(x(2:end),z1(end,:),'k-','LineWidth',2);
if interactive && (~isoctave && use_shock_groups) if interactive && (~isoctave && ~isempty(use_shock_groups))
mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end); mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end);
mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
mydata.shock_group = shock_groups.(shock_ind{ic}); mydata.shock_group = shock_groups.(shock_ind{ic});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment