Use ginput in a datatip

I'd like create an extra toolbar button on the standard plot menu creating a datatip that displays the distance to its previous location when clicked (not to the origin of the plot). Or maybe just a modifier key together with a button press that changes an existing datatip to show its distance to where it was when clicked+modifier. Such functionality seems to be available for sursors in a Simulink scope window, but I'd like to use it for plain MATLAB plots. I strongly suspect this basic facility is available but can't find it?

Answers (1)

Matt J
Matt J on 6 Apr 2026 at 11:58
There is imdistline, but it requires the Image Processing Toolbox.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Release

R2023b

Asked:

on 6 Apr 2026 at 11:30

Answered:

on 6 Apr 2026 at 11:58

Community Treasure Hunt

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

Start Hunting!