create custom mouseover callback?

조회 수: 14 (최근 30일)
sigguy90
sigguy90 2022년 4월 6일
답변: sigguy90 2022년 4월 26일
I have a method to execute a custom callback function upon mouseover of scatter3 plotted points. Essentially, the function prints text in a text edit field of my app. This method relies on setting the UpdateFcn of the datacursormode for the entire figure. Now I would like to have two different axes in my figure, so that method won't work anymore. How can I create a custom callback for a mouseover interaction?
  댓글 수: 1
Rik
Rik 2022년 4월 6일
You could use the window button motion, but you would have to make sure to put a fast check at the start of it to keep the performance reasonable. That way you can determine which axes the cursor is hovering over.

댓글을 달려면 로그인하십시오.

채택된 답변

sigguy90
sigguy90 2022년 4월 26일
I implemented this using iptSetPointerBehavior. The datatips corresponding to each scatter3 object are created and stored. The helper function for pb.enterFcn then sets which datatips are enabled according to which axes is being moused over.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by