double sx = (double) res / ds;
g2.setTransform(AffineTransform.getScaleInstance(sx, sx));
// plot the axes
g2.setColor(Color.BLACK);
Vector dv = new DenseVector(2).assign(size / 2.0);
Vector dv1 = new DenseVector(2).assign(MeanShiftCanopy.getT1());
Vector dv2 = new DenseVector(2).assign(MeanShiftCanopy.getT2());
plotRectangle(g2, new DenseVector(2).assign(2), dv);
plotRectangle(g2, new DenseVector(2).assign(-2), dv);
// plot the sample data
g2.setColor(Color.DARK_GRAY);
dv.assign(0.03);
for (Vector v : sampleData)