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
1da03c6c
Commit
1da03c6c
authored
Apr 24, 2015
by
Houtan Bastani
Browse files
use predefined pgf layers
parent
d242c924
Changes
3
Show whitespace changes
Inline
Side-by-side
src/@graph/writeGraphFile.m
View file @
1da03c6c
...
...
@@ -15,7 +15,7 @@ function o = writeGraphFile(o, pg, sec, row, col)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
4
Dynare Team
% Copyright (C) 2013-201
5
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -61,7 +61,7 @@ else
dd
=
o
.
xrange
;
end
fprintf
(
fid
,
'\\begin{axis}[%%\n'
);
fprintf
(
fid
,
'\\begin{axis}[%%\n
set layers,
'
);
% set tick labels
if
isempty
(
o
.
xTickLabels
)
stringsdd
=
strings
(
dd
);
...
...
@@ -212,18 +212,18 @@ if ~isempty(o.shade)
date2string
(
o
.
shade
(
1
))
' or '
date2string
(
o
.
shade
(
end
))
' is not in the date '
...
'range of data selected.'
]);
if
x1
==
1
fprintf
(
fid
,[
'\\begin{pgfonlayer}{background
0
}\n\\fill[%s!%f]\n(axis '
...
fprintf
(
fid
,[
'\\begin{pgfonlayer}{
axis
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
0
}\n\\fill[%s!%f]\n(axis '
...
fprintf
(
fid
,[
'\\begin{pgfonlayer}{
axis
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
0
}\n\\fill[%s!%f]\n(axis '
...
fprintf
(
fid
,[
'\\begin{pgfonlayer}{
axis
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
);
...
...
src/@report/write.m
View file @
1da03c6c
...
...
@@ -11,7 +11,7 @@ function o = write(o)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
4
Dynare Team
% Copyright (C) 2013-201
5
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -72,9 +72,6 @@ fprintf(fid, '\\setlength{\\parindent}{0in}\n');
fprintf
(
fid
,
'\\setlength{\\tabcolsep}{1em}\n'
);
fprintf
(
fid
,
'\\newlength\\sectionheight\n'
);
fprintf
(
fid
,
'\\begin{document}\n'
);
fprintf
(
fid
,
'\\pgfdeclarelayer{background0}\n'
);
fprintf
(
fid
,
'\\pgfdeclarelayer{background1}\n'
);
fprintf
(
fid
,
'\\pgfsetlayers{background0,background1,main}\n'
);
fprintf
(
fid
,
'\\pgfplotsset{tick scale binop={\\times},\ntrim axis left}\n'
);
fprintf
(
fid
,
'\\centering\n'
);
...
...
src/@report_series/writeSeriesForGraph.m
View file @
1da03c6c
...
...
@@ -12,7 +12,7 @@ function o = writeSeriesForGraph(o, fid, xrange)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2014 Dynare Team
% Copyright (C) 2014
-2015
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -82,7 +82,7 @@ assert(isfloat(o.zeroTol), '@report_series.write: zeroTol must be a float');
%% graphVline && graphHline
if
~
isempty
(
o
.
graphVline
)
fprintf
(
fid
,
'%%Vertical Line\n\\begin{pgfonlayer}{
background1
}\n\\draw'
);
fprintf
(
fid
,
'%%Vertical Line\n\\begin{pgfonlayer}{
axis lines
}\n\\draw'
);
writeLineOptions
(
o
,
fid
);
stringsdd
=
strings
(
xrange
);
x
=
find
(
strcmpi
(
date2string
(
o
.
graphVline
),
stringsdd
));
...
...
@@ -91,7 +91,7 @@ if ~isempty(o.graphVline)
x
,
x
);
end
if
~
isempty
(
o
.
graphHline
)
fprintf
(
fid
,
'%%Horizontal Line\n\\begin{pgfonlayer}{
background1
}\n\\addplot'
);
fprintf
(
fid
,
'%%Horizontal Line\n\\begin{pgfonlayer}{
axis lines
}\n\\addplot'
);
writeLineOptions
(
o
,
fid
);
fprintf
(
fid
,
[
'coordinates {(\\pgfkeysvalueof{/pgfplots/xmin},%f)'
...
'(\\pgfkeysvalueof{/pgfplots/xmax},%f)};\n\\end{pgfonlayer}\n'
],
...
...
...
Write
Preview
Supports
Markdown
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