final double originX = shape.getOriginX();
final double originY = shape.getOriginY();
final Color gridLabelsColor = shape.getGridLabelsColour();
final FontMetrics fontMetrics = FontDesignMetrics.getMetrics(new Font(null, Font.PLAIN, shape.getLabelsSize()));
final float labelHeight = fontMetrics.getAscent();
final float labelWidth = fontMetrics.stringWidth(String.valueOf((int)maxX));
final double xorigin = xStep*originX;
final double yorigin = isXLabelSouth ? yStep*originY+labelHeight : yStep*originY-2;
final double width=gridWidth/2.;
final double tmp = isXLabelSouth ? width : -width;
final SVGElement texts = new SVGGElement(document);