How to scale figure when printed in pdf without losing resolution?

11 ビュー (過去 30 日間)
gsourop
gsourop 2019 年 7 月 15 日
コメント済み: ARBAZKHAN PATHAN 2023 年 11 月 27 日
Hi everyone,
I would like to ask how can I resize a figure (or reduce white space margins around the figure) before printing in pdf without losing resolution. I cannot use export_fig because I cannot install the ghostscript. Is there any other way? Even manually.
A = randn(500,7);
VARNAMES = {'1','2','3','4','5','6','7'};
time = datetime(1950,1:500,1);
fig = figure;
for k = 1:7
subplot (4,2,k)
filename = plot( time' , A( : , k ) );
xlim(datetime([min(time) max(time)]))
title ( VARNAMES(k));
hold on
end
orient(fig,'landscape')
print(fig,'fig4.pdf','-dpdf', '-fillpage', '-r300')
It seems that fillpage leaves a lot of whitespace on top and botton of the pdf figure. Hence, the notes and label of figure will have significant distance with the figure itself.
  1 件のコメント
ARBAZKHAN PATHAN
ARBAZKHAN PATHAN 2023 年 11 月 27 日
Do one thing, Remove the fillpage from your print command

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

回答 (1 件)

Shashank Sharma
Shashank Sharma 2019 年 7 月 16 日
Can you attach your generated pdf ?
It seems to be running fine on my computer.
The titles of the figure and the xlabel appear to be in their proper places.
Check the pdf I have attached.

カテゴリ

Help Center および File ExchangeHistorical Contests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by