Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
reporting
Commits
0b4f3e56
Commit
0b4f3e56
authored
Oct 20, 2015
by
Houtan Bastani
Browse files
add integer ticks to the bottom of IRFs in canned report
parent
ca482602
Changes
1
Hide whitespace changes
Inline
Side-by-side
macros/make_report_irfs.m
View file @
0b4f3e56
function
make_report_irfs
(
M
,
oo
)
function
make_report_irfs
(
M
,
oo
,
ticks_every
)
% Builds canned IRF report
%
% INPUTS
% M [struct]
% oo [struct]
% ticks_every [int] number of spaces between ticks. Default 5.
%
% OUTPUTS
% None
...
...
@@ -45,9 +46,14 @@ function make_report_irfs(M, oo)
disp
(
'make_report_irfs: M_.endo_names does not exist'
);
return
end
if
nargin
<
3
ticks_every
=
5
;
end
n6
=
1
;
justAddedPage
=
0
;
calcxticks
=
false
;
r
=
report
();
for
i
=
1
:
length
(
M
.
exo_names
)
newexo
=
1
;
...
...
@@ -64,6 +70,12 @@ function make_report_irfs(M, oo)
newexo
=
0
;
end
if
any
(
idx
)
if
~
calcxticks
data
=
dseries
(
oo
.
irfs
.
(
fields
{
idx
})
'
);
xTicks
=
1
:
ticks_every
:
floor
(
data
.
nobs
/
ticks_every
)
*
ticks_every
+
1
;
xTickLabels
=
strsplit
(
num2str
(
xTicks
-
1
));
calcxticks
=
true
;
end
r
=
r
.
addGraph
(
'data'
,
dseries
(
oo
.
irfs
.
(
fields
{
idx
})
'
),
...
'title'
,
strrep
(
M
.
endo_names
(
j
,:),
'_'
,
'\_'
),
...
'titleFormat'
,
'\Huge'
,
...
...
...
@@ -71,7 +83,9 @@ function make_report_irfs(M, oo)
'yTickLabelZeroFill'
,
false
,
...
'yTickLabelPrecision'
,
1
,
...
'showZeroLine'
,
true
,
...
'zeroLineColor'
,
'red'
);
'zeroLineColor'
,
'red'
,
...
'xTicks'
,
xTicks
,
...
'xTickLabels'
,
xTickLabels
);
n6
=
n6
+
1
;
justAddedPage
=
0
;
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment