Generate a pdf with plot and table as output

88 ビュー (過去 30 日間)
Mareike Fischer
Mareike Fischer 2021 年 10 月 5 日
コメント済み: Mareike Fischer 2021 年 11 月 10 日
Hi,
I'm wondering wether there is a way to generate a pdf that consists a plot and a table unterneath. Something like a combination of the functions writetable and saveas maybe?
Thanks a lot!

採用された回答

Prateek Rai
Prateek Rai 2021 年 10 月 8 日
To my understanding, you want to generate a pdf that consists of a plot and a table underneath.
You can use the live script to generate this.
Step 1: Create a live script.
Step 2: Write the code for plot. For Example:
a = 1:5:50;
b = 1:10:100;
plot(a,b)
Step 3: Write the code for table in the next section of live script. For Example:
rownames = {'Row1', 'Row2', 'Row3'};
column1 = [1; 2; 3];
column2 = [4; 5; 6];
table(column1, column2, 'RowNames', rownames)
Step 4: Now you can customize the way you want your output by changing the view.
Step 5: Now you can export the code to pdf. There is an "Export to pdf" option in the Save menu on the home tab. Click the down arrow in the save menu to expand the menu and see this and other options.
This will include the plot as well as table both in the pdf. You can also include or exclude your code based on the view you selected.
You can refer to Live Scripts MathWorks documentation page to learn more on live scripts and changing views of live scripts.
  1 件のコメント
Mareike Fischer
Mareike Fischer 2021 年 11 月 10 日
Thanks! The selection of the view is what I was looking for!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLive Scripts and Functions についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by