Skip to Main Content Skip to Search
Product Documentation

getpts - Specify points with mouse

Syntax

[x, y] = getpts(fig)
[x, y] = getpts(ax)
[x, y] = getpts

Description

[x, y] = getpts(fig) lets you choose a set of points in the current axes of figure fig using the mouse. Coordinates of the selected points are returned in X and Y.

Use normal button clicks to add points. A shift-, right-, or double-click adds a final point and ends the selection. Pressing Return or Enter ends the selection without adding a final point. Pressing Backspace or Delete removes the previously selected point.

[x, y] = getpts(ax) lets you choose points in the axes specified by the handle ax.

[x, y] = getpts is the same as [x,y] = getpts(gcf).

See Also

getline | getrect

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS