reporting: bug fix for graphHline

remove-priordens
Houtan Bastani 2014-05-22 17:03:52 +02:00
parent 0059a1bd4b
commit cd6074b5d1
2 changed files with 5 additions and 4 deletions

View File

@ -145,6 +145,7 @@ if isempty(o.yrange)
else
fprintf(fid, 'ymin=%f,\nymax=%f,\n',o.yrange(1),o.yrange(2));
end
fprintf(fid, 'xmin = 1,\nxmax = %d,\n', length(dd));
if o.showLegend
fprintf(fid, 'legend style={');

View File

@ -86,11 +86,11 @@ if ~isempty(o.graphVline)
x, x);
end
if ~isempty(o.graphHline)
fprintf(fid, '%%Horizontal Line\n\\begin{pgfonlayer}{background1}\n\\draw');
fprintf(fid, '%%Horizontal Line\n\\begin{pgfonlayer}{background1}\n\\addplot');
writeLineOptions(o, fid);
fprintf(fid, ['(axis cs:\\pgfkeysvalueof{/pgfplots/xmin},%f) -- (axis ' ...
'cs:\\pgfkeysvalueof{/pgfplots/xmax},%f);\n\\end{pgfonlayer}\n'], ...
o.graphHline, o.graphHline);
fprintf(fid, ['coordinates {(\\pgfkeysvalueof{/pgfplots/xmin},%f)' ...
'(\\pgfkeysvalueof{/pgfplots/xmax},%f)};\n\\end{pgfonlayer}\n'], ...
o.graphHline, o.graphHline);
end
if ~isempty(o.graphVline) || ~isempty(o.graphHline)
% return since the code below assumes that o.data exists