snare

perform basic manipulation on 2D subsets of a data set

You are now following this Submission

Given a vector of x- and y-coordinates of a data set, allows the user to select a subset of the data with the mouse and change the coordinates of that subset much as he/she moves icons around a desktop. There are three modes of selecting the data - 'lasso-ing' the data much like in MS Paint, a rectangular selection much like the desktop icon selection function, and by adding points to a path surrounding the data one point at a time. Snare.m also returns the indices of the data set that are selected last.

Once the user selects a subset of points, he/she may press the left mouse button anywhere within the path and drag the points to a new location. The relative location of the points selected remains constant.

Snare.m automatically pulls up a new window displaying the data and all operations to select and manipulate the data are performed with the mouse. The function is exited by closing the figure window. The indices returned are the indices of the last set of data to be selected.

Cite As

James Roberts (2026). snare (https://www.mathworks.com/matlabcentral/fileexchange/25573-snare), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0