How I do overlay 2 Matlab fig files?

18 ビュー (過去 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 Center および File ExchangeGraphics Object Identification についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by