g2D.draw(new Line2D.Float(xMax - mainTickSize, y, xMax, y));
// Draw unit text with a vertical orientation
g2D.translate(xMax - mainTickSize, y);
g2D.scale(1 / rulerScale, 1 / rulerScale);
g2D.rotate(-Math.PI / 2);
g2D.drawString(yText, -metrics.stringWidth(yText) - 3, fontAscent - 1);
} else {
g2D.draw(new Line2D.Float(xMin, y, xMin + mainTickSize, y));
// Draw unit text with a vertical orientation
g2D.translate(xMin + mainTickSize, y);
g2D.scale(1 / rulerScale, 1 / rulerScale);