Commit 2c6624a4 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: add new background layer

parent dd8156da
......@@ -194,18 +194,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}\n\\fill[%s!%f]\n(axis ' ...
fprintf(fid,['\\begin{pgfonlayer}{background0}\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 ' ...
fprintf(fid,['\\begin{pgfonlayer}{background0}\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 ' ...
fprintf(fid,['\\begin{pgfonlayer}{background0}\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);
......
......@@ -71,9 +71,9 @@ fprintf(fid, '\\renewcommand{\\bottomfraction}{0.8}\n');
fprintf(fid, '\\setlength{\\parindent}{0in}\n');
fprintf(fid, '\\newlength\\sectionheight\n');
fprintf(fid, '\\begin{document}\n');
fprintf(fid, '\\pgfdeclarelayer{background}\n');
fprintf(fid, '\\pgfdeclarelayer{foreground}\n');
fprintf(fid, '\\pgfsetlayers{background,main,foreground}\n');
fprintf(fid, '\\pgfdeclarelayer{background0}\n');
fprintf(fid, '\\pgfdeclarelayer{background1}\n');
fprintf(fid, '\\pgfsetlayers{background0,background1,main}\n');
fprintf(fid, '\\centering\n');
nps = length(o.pages);
......
Supports Markdown
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