How can I plot scatterplot in the UIAxes of App Designer

I want to plot a scatterplot (from communications toolbox) onto a UIAxes created with App designer.
Scatterplot always opens a new figure, and scatterplot does not support the following syntax:
scatterplot(app.UIAxes, SignalofInterest)
Scatterplot does support
scatfig = scatterplot(__)
but I am not sure how I can place the scatfig handle into a UIAxes of app designer.

 採用された回答

Kevin Holly
Kevin Holly 2021 年 11 月 11 日
編集済み: Kevin Holly 2021 年 11 月 11 日

0 投票

App Designer uses uifigure. I found a way to move the scatterplot from the scatterplot figure to the uifigure.
handle = uifigure;
scatfig = scatterplot(rand(10,1),1,0,'b.')
scatfig.Children(2).Parent = handle %Moves axes from scatterplot figure to uifigure window
You can change the scatterplot axes properies through
handle.Children

その他の回答 (1 件)

GERARDO TAPIA
GERARDO TAPIA 2025 年 9 月 26 日

0 投票

Hi May the Lord Jesus Christ bless you in a mighty way
use the plot in the following way
plot(app.UIAxes,Name,'-*','LineWidth',2,'Color','#f29c07');
where name is your data like y
there you go

1 件のコメント

GERARDO TAPIA
GERARDO TAPIA 2025 年 9 月 26 日
plot(app.UIAxesSize,AreaSamp,'-*','LineWidth',2,'Color','#f29c07');

サインインしてコメントする。

カテゴリ

製品

リリース

R2020b

質問済み:

2021 年 11 月 11 日

コメント済み:

2025 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by