boolean setYAxis(int newy0, int newy1) {
    if (newy0 >= newy1 || newy0 < 0 || newy0 > 65535 ||
        newy1 < 0 || newy1 > 65535) {
        return false;
    }
    gy0 = newy0;
    gy1 = newy1;
    repaint();
    return true;
    }