GINPUTPLOT finds points on the plot nearest to the mouse click [XI,YI] = GINPUTPLOT(X,Y,N) gets N points from the current axes and returns the nearest points on the plot of Y versus X, in length N vectors XI and YI. For further details see ginput. [XI,YI] = GINPUTPLOT(X,Y) gathers an unlimited number of points until the return key is pressed. Example: [t,Y] = ode23(@lotka,[0 5],[20 20]'); x = Y(:,1); y = Y(:,2); plot(x,y) [xi,yi] = ginputplot(x,y)