From e02eca9e077a5025ab6cf87e00e8c8eb69c2addb Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Tue, 10 Jun 2014 15:48:49 +0200 Subject: [PATCH] reporting: fix shading on Linux --- @graph/writeGraphFile.m | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/@graph/writeGraphFile.m b/@graph/writeGraphFile.m index 8aaa7de..bfa4802 100644 --- a/@graph/writeGraphFile.m +++ b/@graph/writeGraphFile.m @@ -184,21 +184,8 @@ if ~isempty(o.miscTikzAxisOptions) end fprintf(fid, ']\n'); -if o.showZeroline - fprintf(fid, '%%zeroline\n\\addplot[black,line width=.5,forget plot] coordinates {(1,0)(%d,0)};\n',dd.ndat); -end - -for i=1:ne - o.series{i}.writeSeriesForGraph(fid, dd); - if o.showLegend - le = o.series{i}.getNameForLegend(); - if ~isempty(le) - fprintf(fid, '\\addlegendentry{%s}\n', le); - end - end -end - if ~isempty(o.shade) + fprintf(fid, '%%shading\n'); stringsdd = strings(dd); x1 = find(strcmpi(date2string(o.shade(1)), stringsdd)); x2 = find(strcmpi(date2string(o.shade(end)), stringsdd)); @@ -224,6 +211,19 @@ if ~isempty(o.shade) end end +if o.showZeroline + fprintf(fid, '%%zeroline\n\\addplot[black,line width=.5,forget plot] coordinates {(1,0)(%d,0)};\n',dd.ndat); +end + +for i=1:ne + o.series{i}.writeSeriesForGraph(fid, dd); + if o.showLegend + le = o.series{i}.getNameForLegend(); + if ~isempty(le) + fprintf(fid, '\\addlegendentry{%s}\n', le); + end + end +end fprintf(fid, '\\end{axis}\n\\end{tikzpicture}%%'); if fclose(fid) == -1 error('@graph.writeGraphFile: closing %s\n', o.filename); -- GitLab