Markers on UIAxes in App Designer

12 ビュー (過去 30 日間)
Audrius Bieliunas
Audrius Bieliunas 2023 年 1 月 10 日
回答済み: Walter Roberson 2023 年 1 月 10 日
Hello i have issue to put markers on UIAxes in App Designer after i press button, opens new figure and markers puts on blank not the image. Thank you for your time.
imshow(a,'Parent', app.UIAxes);
[y, x] = ind2sub(szref,holeidx(plugismissing0));
plot(x,y,'o','linewidth',3,'markersize',10, 'color', 'B')
[y, x] = ind2sub(szref,holeidx(plugismisplaced0));
plot(x,y,'x','linewidth',3,'markersize',10, 'color', 'R')

回答 (2 件)

J. Alex Lee
J. Alex Lee 2023 年 1 月 10 日
you probably need to issue plot commands specifying "parent" as the app.UIAxes

Walter Roberson
Walter Roberson 2023 年 1 月 10 日
When you do not tell plot() which axes to display into, then it will call gca() to find the current axes. gca() will not look for axes whose handle visibility is turned off, but by default handle visibility is off for all uiaxes in app designer.
You need to either turn on handle visibility for the target axes and make it the current axes (not recommended), or else you have to pass the target axes to plot() (recommended)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by