this.setMarksStyle("various", 1);
this.setConnected(true, 2);
this.setMarksStyle("point", 2);
this.setColors(new Color[] { Color.RED, Color.BLUE });
VariableNumber xvar = model.getMatrix().getVariables()[this.xvar];
VariableNumber yvar = model.getMatrix().getVariables()[this.yvar];
int[] qx = xvar.getUniStats().getQuantili();
int[] qy = yvar.getUniStats().getQuantili();
double xRange = xvar.getUniStats().getRangeValue() / 100;
double yRange = yvar.getUniStats().getRangeValue() / 100;
double xMin = xvar.getUniStats().getMinValue();
double yMin = yvar.getUniStats().getMinValue();
setXRange(xvar.getUniStats().getMinValue(), xvar.getUniStats().getMaxValue());
if (xvar.getType() == JWATConstants.DATE) {
SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
addXTick(f.format(new Date((long) (xMin + xRange / 10))), xMin + xRange / 10);
addXTick(f.format(new Date((long) (xMin + (xRange * 100) / 2))), xMin + (xRange * 100) / 2);
addXTick(f.format(new Date((long) (xMin + (xRange * 99)))), xMin + (xRange * 99));
} else {
setXLabel("Quantiles of " + xvar.getName());
}
setYRange(yvar.getUniStats().getMinValue(), yvar.getUniStats().getMaxValue());
if (yvar.getType() == JWATConstants.DATE) {
SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
addYTick(f.format(new Date((long) (yMin + yRange / 10))), yMin + yRange / 10);
addYTick(f.format(new Date((long) (yMin + (yRange * 100) / 2))), yMin + (yRange * 100) / 2);
addYTick(f.format(new Date((long) (yMin + (yRange * 99)))), yMin + (yRange * 99));
} else {
setYLabel("Quantiles of " + yvar.getName());
}
for (int i = 0; i < qx.length; i++) {
addPoint(1, xvar.getValue(qx[i]), yvar.getValue(qy[i]), true);
addPoint(2, xMin + (xRange * i), yMin + (yRange * i), true);
}
fillPlot();
}