getline

Select polyline with mouse

Syntax

[x, y] = getline(fig)
[x, y] = getline(ax)
[x, y] = getline
[x, y] = getline(...,'closed')

Description

[x, y] = getline(fig) lets you select a polyline in the current axes of figure fig using the mouse. Coordinates of the polyline are returned in X and Y. Use normal button clicks to add points to the polyline. A shift-, right-, or double-click adds a final point and ends the polyline selection. Pressing Return or Enter ends the polyline selection without adding a final point. Pressing Backspace or Delete removes the previously selected point from the polyline.

[x, y] = getline(ax) lets you select a polyline in the axes specified by the handle ax.

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

[x, y] = getline(...,'closed') animates and returns a closed polygon.

See Also

|

Was this topic helpful?