%N winnear %F $MIR/src/subs/win.for
%D Return the nearest point
%P pjt
%: plotting, pgplot, user-interaction
%B
        subroutine WinNear( nx, ny, xpos, ypos, count, x, y, 
     *                      idx, dist )
        implicit none
        integer count, nx, ny, idx
        real xpos, ypos, x(*), y(*), dist

    WinNear finds the nearest data point to an absolute position.
    The ordinal number of the data point is returned if the point
    is unambiguous, otherwise the negative is returned.
