How I do overlay 2 Matlab fig files?

조회 수: 25 (최근 30일)
Struggling in MATLAB
Struggling in MATLAB 2023년 3월 13일
댓글: Voss 2023년 3월 14일
I have 2 .fig files I want to overlay. Only difference between them is the trajectory line. I want to keep the legends same in the overlay figures as in the individual figures. I have attached the .fig files. How should I do it?

채택된 답변

Voss
Voss 2023년 3월 13일
f1 = openfig('trajectory id_88092.fig');
f2 = openfig('trajectory id_90788.fig');
leg = findall(f2,'Type','legend');
leg.AutoUpdate = 'off';
ln = findall(f1,'Type','line');
ax = findall(f2,'Type','axes');
ln_copy = copyobj(ln,ax);
uistack(ln_copy,'bottom')
  댓글 수: 2
Struggling in MATLAB
Struggling in MATLAB 2023년 3월 14일
Thank you! It worked perfectly.
Voss
Voss 2023년 3월 14일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by