Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Function print: why exported files are different in versions R2016b and R2008b?
조회 수: 1 (최근 30일)
이전 댓글 표시
I just got the new MatLab version (R2016b) and ran old script (R2008b) with it, but exported pdf-file was different. The used function is print, but when I use saveas-function the problem is the same: R2016b exports only part of the figure. R2008b exported file is OK. See pictures below. Is this a bug or a user error?
Used code:
if true
clear all;
close all;
x = [0:pi/20:2*pi];
y = sin(x);
plot(x,y,'r')
title('Sine wave between 0 and 2\pi')
grid on;
legend('sine wave')
% paper size
paper_A4 = [21 29.7]; % [cm]
% landscape A4
x_paper = paper_A4(2);
y_paper = paper_A4(1);
% marginal
marginal = 1; % [cm]
% picture
x_picture = x_paper-2*marginal;
y_picture = y_paper-2*marginal;
set(gca, 'Units', 'centimeters')
set(gca,'Position',[marginal marginal x_picture y_picture]); % picture on paper
set(gcf, 'PaperUnits', 'centimeters', ...
'PaperSize', [x_paper y_paper],...
'PaperPosition', [0 0 x_paper y_paper]);
%print('picture_R2016b','-dpdf')
print('picture_R2008b','-dpdf')
end
Version R2008b
Version R2016b
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!