필터 지우기
필터 지우기

Can you automatically save a figure in A3 as a pdf?

조회 수: 16 (최근 30일)
Max1234
Max1234 2023년 4월 13일
답변: Divyanshu 2023년 4월 17일
Hi guys,
I have created a figure with the following dimensions.
fig = figure('Name','Example','Position',[-300 1120 2200 1300]);
I need the dimensions to be able to display them so well on my screen and I can't change them. However, I would now like to save the figure as a PDF in A3 format and possibly print it. Unfortunately, I have not yet found a way of automatically adapting the figure to the size of an A3 sheet in landscape format. Can anyone help me?
Many thanks in advance!

답변 (1개)

Divyanshu
Divyanshu 2023년 4월 17일
To save the figure as a pdf on a A3 size paper in landscape you can have a look at the below demo script which saves a simple plot figure as a pdf in landscape mode.
figure('Name','Example','Position',[-300 1120 2200 1300]);
plot([1 2 3],[2 4 6])
set(gcf,'Units','inches');
screenposition = get(gcf,'Position');
set(gcf,...
'PaperPosition',[0 0 screenposition(3:4)],...
'PaperOrientation','landscape',...
'PaperType','a3',...
'PaperSize',[screenposition(3:4)]);
print -dpdf -vector newFig
The figure would be saved with a name newFig.pdf. And please refer to the following documentation for detailed understanding of various properties and options of set function:

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by