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);
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)
plotRectangle(g2, v, dv);
}