Create one figure from 2 different figures

1 回表示 (過去 30 日間)
Tolga MERT
Tolga MERT 2014 年 7 月 25 日
コメント済み: Image Analyst 2014 年 7 月 25 日
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

回答 (1 件)

Ben11
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
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 ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by