private void drawXHatches(int yPosition) {
        int numberOfXHatches = (int) Math.round(1.0d * getWidth() / xScale);
        int distanceBetweenHatches = (int) Math.round(1.0d * getWidth() / numberOfXHatches);

        int x0, x1;
        int y0 = yPosition - HATCH_LENGTH / 2;
        int y1 = yPosition + HATCH_LENGTH / 2;

        for (int i = -numberOfXHatches * zoomDimensionCorrection + 1;
                i < numberOfXHatches * zoomDimensionCorrection;
                i++) {
            x0 = i * distanceBetweenHatches;
            x1 = x0;
            g2.drawLine(x0, y0, x1, y1);
        }
    }