How to merge figures in one another?

조회 수: 4 (최근 30일)
Simone D'Ingianna
Simone D'Ingianna 2017년 5월 13일
답변: LISSA DUVVU 2020년 11월 20일
I have two different figures : figure(1); and figure(2); I want these to be merged into a figure(3) to be shown together.
How to ?
notice: I do not want to use function hold for plots.

답변 (1개)

LISSA DUVVU
LISSA DUVVU 2020년 11월 20일
h1=openfig('figure1','reuse');
ax1=gca;
h2=openfig('figure2','reuse');
ax2=gca;
%%figure 3%%
s1=subplot(2,1,1)
s2=subplot(2,1,2)
fig1=get(ax1,'children');
fig2=get(ax2,'children');
copyobj(fig1,s1);
copyobj(fig2,s2);

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by