def draw(win, y, x, s):
    """ Clip and plot, inverting y """
    rows, cols = win.getmaxyx()
    ix = int(x)
    iy = -int(y) + rows - 1
    if iy >= 0 and iy < rows:
        if ix >= 0 and ix < cols:
            win.addstr(iy, ix, s)
