dragging a selected point within uiaxes

15 ビュー (過去 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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by