Merging existing subplots into a single one
28 ビュー (過去 30 日間)
古いコメントを表示
Lets say I have two subplots, both of dimensions (2,1), saved as matlab figures. Is there any way for me to merge them into a single subplot figure of dimensions (2,2)?
2 件のコメント
João Mendes
2021 年 4 月 16 日
Hi, for two images, maybe try the imshowpair function. For two plots, you can try to use the hold on command.
Tell me if it helps,
J.
採用された回答
Rik
2021 年 4 月 16 日
This is a surprisingly difficult task. You will have to copy all objects to the same figure and adapt the Position properties of all children of the two figures. I doubt calls like subplot(2,2,__) are going to work after that.
It is often easier to make sure your plotting code accepts an axes handle as input. That way your plotting code is not dependent on the surrounding figure, making it much easiers to copy all objects over.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!