Problem in cropping the pdf image in matlab

21 ビュー (過去 30 日間)
AVM
AVM 2020 年 6 月 12 日
コメント済み: Ameer Hamza 2020 年 6 月 12 日
I have the following pdf image generated by matlab code. When I save this image as ''pdf'', it comes up with huge white portion that I really want to remove. I just keep the image portion only. Please somebody help me to get that. Pl see the attachment for image in ''pdf''.
  5 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 6 月 12 日
"I thought that as pdf image has good resolution"
Not necessarily. You can save high-resolution png and jpg files too. pdf is useful if you want vector image; however, in that case, I prefer eps over pdf.
AVM
AVM 2020 年 6 月 12 日
@Ameer: Thanks for your information.

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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 6 月 12 日
編集済み: Ameer Hamza 2020 年 6 月 12 日
Try exportgraphics() in R2020a
t = linspace(0, 2*pi, 100);
r = linspace(0, 1, 100);
polarplot(t, r)
exportgraphics(gcf, 'test.pdf');
The output pdf file is attached.
For older releases
t = linspace(0, 2*pi, 100);
r = linspace(0, 1, 100);
polarplot(t, r)
export_fig(gcf, 'test.pdf');
  8 件のコメント
AVM
AVM 2020 年 6 月 12 日
@Ameer: ''You can just open the fig file and while it is opened, run the code in my answer, It will work.''
Where the code has to be run? In command window or in script?
Ameer Hamza
Ameer Hamza 2020 年 6 月 12 日
You can run it in command window or in a new script.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by