how to use gscatter in matlab app designer?

4 ビュー (過去 30 日間)
Muazma Ali
Muazma Ali 2022 年 7 月 27 日
コメント済み: Kevin Holly 2022 年 7 月 29 日
Hi !
I have tried to use gscatter in app designer then I experienced two problems;
  • I have problems with adjusting my axis; I want my x-axis to go from 0 to 1 and my y axis to go from 50 to 500 , by changing the tick values I didnt succeed with my problem
  • I got this error message when I used UIAxes as my first argument in gscatter function ( shown in the picture attached) . Is it not possible to use gscatter then in the app designer?

回答 (1 件)

Kevin Holly
Kevin Holly 2022 年 7 月 27 日
I didn't have an issue using gscatter (see app attached).
I used the following commands:
gscatter(app.UIAxes,rand(10,1),500*rand(10,1));
xlim(app.UIAxes,[0 1])
ylim(app.UIAxes,[50 500])
What version of MATLAB are you using?
  3 件のコメント
Muazma Ali
Muazma Ali 2022 年 7 月 29 日
@Kevin Holly No I still get the same error..:(
Kevin Holly
Kevin Holly 2022 年 7 月 29 日
If you are using R2018b, then see the attached app that uses the following workaround:
h = gscatter(rand(10,1),500*rand(10,1));
h.Parent=app.UIAxes;
close(gcf)
xlim(app.UIAxes,[0 1])
ylim(app.UIAxes,[50 500])

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

カテゴリ

Help Center および File ExchangeCreate Custom UI Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by