JFreeChart chart = ChartFactory.createScatterPlot(null,
null, null, dataset, PlotOrientation.VERTICAL, legend, true, false);
XYPlot plot = (XYPlot) chart.getPlot();
XYDotRenderer renderer = new XYDotRenderer();
renderer.setDotWidth(4);
renderer.setDotHeight(4);
if (this.file.isRegression()) {
int per = 255 / 10;
int r = 0;
int b = 255;
for(int i=0;i<file.getSeriesCount();i++) {
renderer.setSeriesPaint(i, new Color(r,0,b));
r+=per;
b-=per;
}
} else {
for (int i = 0; i < file.getSeriesCount(); i++) {
renderer.setSeriesPaint(i, COLORS[i % COLORS.length]);
}
}
plot.setRenderer(renderer);
plot.setDomainCrosshairVisible(true);