LineManipulator

Allows mouse-based manipulation of the data of a line object.
702 Downloads
Updated 16 Jul 2012

View License

The originally intended use is to give the user of a gui the opportunity to create his own function/dataset which can be fetched from the X/YData of the line object after it has been changed.

The function adds a few callbackfunctions to the figure that contains the line object. These implement the following functionalities:
-adding points to the line
-removing points from the line
-moving existing points under different restrictions

You basically just have to call 'LineManipulator(lineHandle,controlMode)'
with lineHandle being a valid handle to a line object and controlMode being one of the following strings:
'nocheck'
everything is allowed
'stopx','stopy','stopxy'
blocks the moving data point when it would pass the neigbouring points on the x/y-axis
'pushx','pushy','pushxy'
pushes all other data points with the moving data point if it would pass them on the x/y-axis
'off'
deactivates the functionality

Cite As

Thomas Otterstaetter (2024). LineManipulator (https://www.mathworks.com/matlabcentral/fileexchange/30369-linemanipulator), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Line Plots in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Added the functionality to turn everything off/switch back to normal by calling:
LineManipulator(lineHandle,'off')

1.0.0.0