Skip to content

Commit 7277e8c

Browse files
committed
refactor plot variables and enhance shock handling in combined plots
1 parent a3b7ba1 commit 7277e8c

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

test/fix_combined_plots.jl

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,31 @@ MacroModelling.plot_irf!(RBC, parameters = [:std_z => 0.021, :β => 0.97, :ρ =>
3232
include("models/SW07_nonlinear.jl")
3333

3434
plot_irf(SW07_nonlinear, shocks = :ew,
35-
variables = [:gam1,:gam2,:gam3,
35+
variables = [:robs,:ygap,:pinf,
3636
# :gamw1,:gamw2,:gamw3,
37-
:inve,:kp,:k],
37+
:inve,:c,:k],
38+
# variables = [:ygap],
3839
parameters = [:ctrend => .35, :curvw => 10, :calfa => 0.18003])
3940

41+
for s in setdiff(get_shocks(SW07_nonlinear),["ew"])
42+
MacroModelling.plot_irf!(SW07_nonlinear, shocks = s,
43+
variables = [:robs,:ygap,:pinf,
44+
# :gamw1,:gamw2,:gamw3,
45+
:inve,:c,:k],
46+
# variables = [:ygap],
47+
parameters = [:ctrend => .35, :curvw => 10, :calfa => 0.18003])
48+
end
49+
50+
# handle case where one plots had one shock, the other has multiple ones
51+
# when difference is along one dimension dont use tabel but legend only
4052
MacroModelling.plot_irf!(SW07_nonlinear,
41-
shocks = :ew,
53+
shocks = :epinf,
54+
variables = [:gam1,:gam2,:gam3,
55+
# :gamw1,:gamw2,:gamw3,
56+
:inve,:kp,:k])
57+
58+
MacroModelling.plot_irf!(SW07_nonlinear,
59+
shocks = [:epinf,:ew],
4260
variables = [:gam1,:gam2,:gam3,
4361
# :gamw1,:gamw2,:gamw3,
4462
:inve,:kp,:k],

0 commit comments

Comments
 (0)