How to click onto x-y coordinate and run a script related to this x-y coordinate?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I hope somebody can advise whether this is possible, and if it is, then how.
I am plotting x-y data. I want to be able to click onto a x-y coordinate, and this click would enable a run of a script that would open/plot another figure.
In my case I am plotting eigenvalues (real and imag axis). I want to click on an eigenvalue and get another figure which would plot participation factors related to this eigenvalue.
Many thanks, Marina.
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 12월 19일
It could be hacked using datacursormode and a custom callback.
But you will probably find it easier to use a ButtonDownFcn axes callback (after having set the plotted lines themselves to HitTest off). The callback would need to figure out what was being clicked on and react appropriately.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Visual Exploration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!