GUI AXES Object detecting

조회 수: 2 (최근 30일)
Ali
Ali 2013년 3월 29일
Hi,
I'm developing a GUI code which use an Axes to plot the results, my results are Lines, I was wondering to know if there is any way to access to objects by mouse? I want to add a menu which shows the property of the line like thickness and color which is different for each line. I need to know if I can access to the objects Tag by right click on it and then show the proper data in the menu?
Thanks

답변 (1개)

Doug Hull
Doug Hull 2013년 3월 29일
You are looking to set callbacks on the lines.
This is similar:
  댓글 수: 2
Ali
Ali 2013년 4월 1일
Hi Doug,
Thanks for your response. I tried your solution, but, I think I'm doing something wrong. I can get callback from the axes in my GUI interface just by clicking on the background but on the lines does not give any thing. Can you please let me know how can I get callback from the lines in the axes? what kind of function should I define? I do appreciate your answer.
Walter Roberson
Walter Roberson 2013년 4월 1일
set() the Callback on the lines to be appropriate, possibly the same as the Callback for the axes, possibly different.
Alternately, set() Hittest 'off' on the lines so that clicking on them activates the axes callback.
Alternately, only set the Callback for the lines and not for the axes.

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

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by