protected void drawData(Graphics g) {
        if (graphValues == null) return;
        g.setColor(color);
        
        int X, Y;
        int xval, yval;

        for (int i = 0; i < graphBuffer.getRows(); i++) {
            
            xval = graphValues[0][i];
            yval = graphValues[1][i];

            if (xval != graphBuffer.getInvalidNumber()) {
                if (yval != graphBuffer.getInvalidNumber()) {

                    // do not plot "out of range" values
                    if (xval < xmin || xval > xmax || yval < ymin || yval > ymax) continue;


                    X = computeX(xval);
                    Y = computeY(yval);

                    g.drawLine(X-2, Y, X+2, Y);
                    g.drawLine(X, Y-2, X, Y+2);
                }
            }
        }
    }