Create one figure from 2 different figures
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone,
I have 2 different figures. One of them is an empty template with logos, a kind of a background. The other one is the existing subplots. The question is, how can I make matlab generate the subplots on this empty template figure with logos ?
tempfigure1 = figure('PaperType','A4','PaperSize',[29.7 21],'PaperOrientation', 'landscape',...
'Color',[1 1 1],'Units', 'centimeters','Position',[2 2 29.7 21]);
% The code continues like this with tempfigure1
A part of the other figure is created with this code:
subplot(tempPosition{tempCNT,1},tempPosition{tempCNT,2},tempPosition{tempCNT,3});
%alltemps are already defined before this line
With those codes, matlab gives me 2 different figures that I don't need. After creating them both in a figure I would like to export it as pdf with this following code which just exports one of the figures :
print(gcf, '-dpdf', 'output.pdf');
I appreciate your help !
Regards,
Tolga
댓글 수: 0
답변 (1개)
Ben11
2014년 7월 25일
I think you need to use
hold on
before the first plot and
hold off
after the last plot so that you get a single figure. Sounds simple but it should do the trick.
댓글 수: 1
Image Analyst
2014년 7월 25일
Tolga's "Answer" moved here since it looks like it should be a comment to Ben11:
"hold on" works perfectly!
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!