chart.setTitle(title);
XYSeries s1 = new XYSeries("Aligned pairs");
XYSeries s2 = new XYSeries("Non-aligned pairs");
XYSeries s3 = new XYSeries("Model");
PolynomialFunction function = getPolynomialFunction(data, linear);
for (AlignStructMol point : data) {
if (point.Aligned) {
s1.add(point.row1.getPeaks()[0].getRT(),
point.row2.getPeaks()[0].getRT());
} else {
s2.add(point.row1.getPeaks()[0].getRT(),
point.row2.getPeaks()[0].getRT());
}
try {
s3.add(function.value(point.row2.getPeaks()[0].getRT()),
point.row2.getPeaks()[0].getRT());
} catch (Exception e) {
}
}