Selecting points from UI Axes App Designer MATLAB R2019a

70 views (last 30 days)
I am plotting this histogram on UI Axes App Designer R2019a, and I want the user to be able to interactively split the plot using vertical lines (so that I can get the X coordinate at which they are placed). I was previously using getpts, which does not seem to work on UI Axes. Is there a solution for this?

Accepted Answer

Abhilash Padma
Abhilash Padma on 16 Aug 2019
I understand that you want to split the plot using vertical lines whenever you click on the axes. But, there is no built-in functionality of adding callbacks to UIAxes as of now. Rather, consider using the ButtonDownFcn callback of plot object to draw vertical lines. Here, the plot object can be used to get your expected output.The following code below may help you solve the problem.
function mouseClick(~,~)
Prashanth Thambala
Prashanth Thambala on 22 Sep 2022 at 11:15
@Abhilash Padma can you help me to break out of the function, as the function does not run for finite clicks and stores the last clicked value

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by