ginput breaks matlab live editor
2 views (last 30 days)
Show older comments
Hi I have used ginput before, but now I am trying to run it in Matlab live editor and it seems to freeze the live editor, which simply keeps a state of 'busy' with no cross hairs and no resolution. Can anyone advise how to get ginput functionality in the live editor?
2 Comments
Adam Danz
on 25 Mar 2020
The following works for me when I run it from Live Editor, though it requires using an external figure since ginput() is not (yet) supported for UIFigures (as of r2019b).
fh = figure();
set(fh, 'Visible','on')
ax = axes(fh);
plot(ax, rand(1,10), rand(1,10), 'o')
xy = ginput(1);
title(ax,sprintf('(%.3f, %.3f)', xy(1),xy(2)))
Answers (0)
See Also
Categories
Find more on Visual Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!