Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
0feeb0f2
Commit
0feeb0f2
authored
11 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
reporting: fix shading
parent
9f3333db
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/reports/@graph/writeGraphFile.m
+17
-5
17 additions, 5 deletions
matlab/reports/@graph/writeGraphFile.m
tests/reporting/runDynareReport.m
+2
-4
2 additions, 4 deletions
tests/reporting/runDynareReport.m
with
19 additions
and
9 deletions
matlab/reports/@graph/writeGraphFile.m
+
17
−
5
View file @
0feeb0f2
...
...
@@ -185,11 +185,23 @@ if ~isempty(o.shade)
assert
(
~
isempty
(
x1
)
&&
~
isempty
(
x2
),
[
'@graph.writeGraphFile: either '
...
date2string
(
o
.
shade
(
1
))
' or '
date2string
(
o
.
shade
(
end
))
' is not in the date '
...
'range of data selected.'
]);
fprintf
(
fid
,[
'\\begin{pgfonlayer}{background}\n\\fill[%s!%f]\n(axis '
...
'cs:%f,\\pgfkeysvalueof{/pgfplots/ymin})\nrectangle (axis '
...
'cs:\\pgfkeysvalueof{/pgfplots/xmax},\\pgfkeysvalueof{/'
...
'pgfplots/ymax});\n\\end{pgfonlayer}\n'
],
...
o
.
shadeColor
,
o
.
shadeOpacity
,
x1
);
if
x1
==
1
fprintf
(
fid
,[
'\\begin{pgfonlayer}{background}\n\\fill[%s!%f]\n(axis '
...
'cs:\\pgfkeysvalueof{/pgfplots/xmin},\\pgfkeysvalueof{/pgfplots/ymin})\nrectangle (axis '
...
'cs:%f,\\pgfkeysvalueof{/pgfplots/ymax});\n\\end{pgfonlayer}\n'
],
...
o
.
shadeColor
,
o
.
shadeOpacity
,
x2
);
elseif
x2
==
dd
.
ndat
fprintf
(
fid
,[
'\\begin{pgfonlayer}{background}\n\\fill[%s!%f]\n(axis '
...
'cs:%f,\\pgfkeysvalueof{/pgfplots/ymin})\nrectangle (axis '
...
'cs:\\pgfkeysvalueof{/pgfplots/xmax},\\pgfkeysvalueof{/'
...
'pgfplots/ymax});\n\\end{pgfonlayer}\n'
],
...
o
.
shadeColor
,
o
.
shadeOpacity
,
x1
);
else
fprintf
(
fid
,[
'\\begin{pgfonlayer}{background}\n\\fill[%s!%f]\n(axis '
...
'cs:%f,\\pgfkeysvalueof{/pgfplots/ymin})\nrectangle (axis '
...
'cs:%f,\\pgfkeysvalueof{/pgfplots/ymax});\n\\end{pgfonlayer}\n'
],
...
o
.
shadeColor
,
o
.
shadeOpacity
,
x1
,
x2
);
end
end
fprintf
(
fid
,
'\\end{axis}\n\\end{tikzpicture}\n'
);
...
...
This diff is collapsed.
Click to expand it.
tests/reporting/runDynareReport.m
+
2
−
4
View file @
0feeb0f2
...
...
@@ -205,12 +205,10 @@ rep = rep.addSeries('data', dc_q{'LRPOIL_WORLD'}, ...
'graphLineStyle'
,
'dashed'
,
...
'graphLineWidth'
,
1.5
);
srange1
=
prange
(
1
):
forecast_date
;
rep
=
rep
.
addGraph
(
'title'
,
'Equilibrium World Real Oil Price'
,
...
'xrange'
,
prange
,
...
'shade'
,
srange
,
...
'xTicks'
,
[
1
,
5
,
10
,
15
,
find
(
srange
(
1
)
==
prange
),
length
(
prange
)],
...
'xTickLabels'
,{
startpoint
{:},
'2008Q1'
,
'2009Q2'
,
'2010Q3'
,
shaded
{:},
endpoint
{:}},
...
'xTickLabelRotation'
,
0
);
'shade'
,
srange1
);
rep
=
rep
.
addSeries
(
'data'
,
db_q
{
'LRPOIL_BAR_WORLD'
},
...
'graphLineColor'
,
'blue'
,
...
'graphLineWidth'
,
1.5
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment