Skip to content
Snippets Groups Projects
Commit e02eca9e authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: fix shading on Linux

parent 0c596e85
No related branches found
No related tags found
No related merge requests found
...@@ -184,21 +184,8 @@ if ~isempty(o.miscTikzAxisOptions) ...@@ -184,21 +184,8 @@ if ~isempty(o.miscTikzAxisOptions)
end end
fprintf(fid, ']\n'); 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) if ~isempty(o.shade)
fprintf(fid, '%%shading\n');
stringsdd = strings(dd); stringsdd = strings(dd);
x1 = find(strcmpi(date2string(o.shade(1)), stringsdd)); x1 = find(strcmpi(date2string(o.shade(1)), stringsdd));
x2 = find(strcmpi(date2string(o.shade(end)), stringsdd)); x2 = find(strcmpi(date2string(o.shade(end)), stringsdd));
...@@ -224,6 +211,19 @@ if ~isempty(o.shade) ...@@ -224,6 +211,19 @@ if ~isempty(o.shade)
end end
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}%%'); fprintf(fid, '\\end{axis}\n\\end{tikzpicture}%%');
if fclose(fid) == -1 if fclose(fid) == -1
error('@graph.writeGraphFile: closing %s\n', o.filename); error('@graph.writeGraphFile: closing %s\n', o.filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment