Commit 5e00e5f3 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @series: add new option tableMarkerLimit

parent a4c4f9e0
......@@ -7925,6 +7925,12 @@ for graphs. Default: @code{false}
Whether or not to align the series name to the right of the
cell. Default: @code{false}
@item tableMarkerLimit, @code{DOUBLE}
For values less than @math{-1*@code{tableMarkerLimit}}, mark the cell
with the color denoted by @ref{tableNegColor}. For those greater than
@code{tableMarkerLimit}, mark the cell with the color denoted by
@ref{tablePosColor}. Default: @code{1e-4}
@item tableNegColor, @code{LATEX_COLOR}
The color to use when marking Table data that is less than
......@@ -47,6 +47,7 @@ o.graphMarkerSize = 6;
o.tableShowMarkers = false;
o.tableNegColor = 'red';
o.tablePosColor = 'blue';
o.tableMarkerLimit = 1e-4;
o.tableAlignRight = false;
......@@ -44,6 +44,7 @@ assert(ischar(o.tableNegColor), '@series.write: tableNegColor must be a string')
assert(ischar(o.tablePosColor), '@series.write: tablePosColor must be a string');
assert(islogical(o.tableShowMarkers), '@series.write: tableShowMarkers must be true or false');
assert(islogical(o.tableAlignRight), '@series.write: tableAlignRight must be true or false');
assert(isfloat(o.tableMarkerLimit), '@series,write: tableMarkerLimit must be a float');
%% Write Output
dataString = ['%.' num2str(precision) 'f'];
......@@ -62,9 +63,9 @@ data =;
for i=1:size(data,1)
fprintf(fid, ' &');
if o.tableShowMarkers
if data(i) < 0
if data(i) < -o.tableMarkerLimit
fprintf(fid, '\\color{%s}', o.tableNegColor);
elseif data(i) > 0
elseif data(i) > o.tableMarkerLimit
fprintf(fid, '\\color{%s}', o.tablePosColor);
fprintf(fid, '[');
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