필터 지우기
필터 지우기

dragging a selected point within uiaxes

조회 수: 7 (최근 30일)
Alain Barraud
Alain Barraud 2021년 1월 25일
댓글: Adam Danz 2021년 2월 15일
Hello,
wihin standard figure and axes, I can easely move point.
These points are the graphical representation of complex numbers, so when I move a point I must move its conjugate accordingly.
All works fine with classical figure. I currently use gco to obtain the current point handle. What would be the equivalent with uiaxes within an uifigure?
Best Regards
  댓글 수: 1
Adam Danz
Adam Danz 2021년 1월 26일
"dragging" a plotted point isn't supported in any type of figure although some objects such as text or a point object are draggable.

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

채택된 답변

Adam Danz
Adam Danz 2021년 1월 26일
편집: Adam Danz 2021년 1월 26일
HandleVisibility is set to off by default with uifigures and this prevents gcf/gca/gco from accessing the figure handle or anything within the figure.
Just before using gco, set the HandleVisibility to "on" and then set it off again at the end of the function.
Example
% uifig is the handle to the figure
uifig.HandleVisibility = 'on';
h = gco();
uifig.HandleVisibility = 'off';
% You could leave it on but that risks other plotting functions
% having unintended access to the figure.
Alternatively you can set the handle visibility to "callback" so that it's accessible from callback functions.
You may need to make the figure & axes active after doing this; if so, see these instructions to a similar question.
  댓글 수: 14
Alain Barraud
Alain Barraud 2021년 2월 14일
hello
The problem has been recognised as a bug by mathworks and has been fixed in MATLAB R2021a !! Good news!!
Alain
Adam Danz
Adam Danz 2021년 2월 15일

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by