image thumbnail

Draggable data tips

version (4.78 KB) by Yair Altman
Enable dragging Matlab plot data-tips


Updated 14 Mar 2019

View License

Matlab plots can display data-tips but these cannot be interactively moved except to the 4 corners of the data point.

This utility enables the user to interactively drag any newly-created data-tip, anywhere in the Matlab figure. A dashed line connects the dragged data-tip with the original data point.

The new draggable functionality only affects new data-tips, so it can be turned on/off to enable standard and new data-tips to co-exist in the same plot (see screenshot).

Syntax: draggableDataTips(newState)

draggableDataTips('on') or draggableDataTips(true) turns the new functionality ON for new data-tips.
draggableDataTips('off') or draggableDataTips(false) turns the new functionality OFF for new data tips.

Relies on undocumented functionality.
This utility fails in HG2 (R2014b+) - please don't bug me about it, unless you found a solution...
On HG2 (R2014b+), use Allen's submission:

Technical description:

Cite As

Yair Altman (2022). Draggable data tips (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release to R2014a
Platform Compatibility
Windows macOS Linux

Inspired: DragDataTip

Community Treasure Hunt

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

Start Hunting!