Put scatter plot and regression into one file

1 回表示 (過去 30 日間)
alpedhuez
alpedhuez 2020 年 12 月 2 日
編集済み: Monisha Nalluru 2020 年 12 月 8 日
I have two variables and I create a scatter plot. I also run fitlm to conduct a regression. How can one let Matlab put the scatter plot and table from fitlm into one output file?
  3 件のコメント
alpedhuez
alpedhuez 2020 年 12 月 2 日
Probably "add table at the bottom of the plot." Thank you.
Ameer Hamza
Ameer Hamza 2020 年 12 月 3 日
There is no built-in way to add tables to figures in MATLAB.

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

採用された回答

Monisha Nalluru
Monisha Nalluru 2020 年 12 月 8 日
編集済み: Monisha Nalluru 2020 年 12 月 8 日
From my understanding,
You want to create a figure which has scatter plot and table.
This can be done using uifigure with uiaxes to display scatter plot and uitable to display the table.
As an example
f=uifigure;
f.Position(3:4) = [822 360];
ax=uiaxes(f);
ax.Position(1) = 415;
x=linspace(1,10,10);
y=x.*2;
scatter(ax,x,y);
t=table(x',y');
uit=uitable(f,'Data',t);
uit.Position(3) = 375;
Use position property to display the table under the scatter plot or uigridlayout with two rows and one column
Hope this helps!
  1 件のコメント
alpedhuez
alpedhuez 2020 年 12 月 8 日
Let me work on it.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by