// Data header
b.append("Section: ").append(driverName).append(' ').append(label).
append('\n');
b.append("Display: Line\n");
TextTable table = new TextTable(bucketLimit, txTypes + 1);
// The X axis headers and column headers, or legends
table.setHeader(0, "Time (s)");
for (int j = 0; j < txTypes; j++) {
table.setHeader(j + 1, txNames[j]);
}
// The X axis and the data
for (int i = 0; i < bucketLimit; i++) {
// The X axis
table.setField(i, 0, String.format(unitFormat, unit * i));
// The data
for (int j = 0; j < txTypes; j++) {
double data = 0d;
if (divider[j][i] != 0) {
data = rawGraph[j][i] / (divider2 * divider[j][i]);
}
table.setField(i, j + 1, String.format(dataFormat, data));
}
}
table.format(b);
b.append('\n');
}