Merging three 3D plots into one
15 ビュー (過去 30 日間)
古いコメントを表示
Dear community,
How can I merge three different 3D plots into one? My figures are saved in .fig (here I attach them), and I would like to plot them in the same graph to compare them. Is it possible to change the color of each of them and put a label to compare them properly? I have seen in the forum that I can apply the commands:
findobj
and
copyobj
but I don't know how they properly work.
Thanks in advance!
0 件のコメント
採用された回答
Dave B
2021 年 10 月 18 日
You can copy the surfaces from each of the axes, in each of the figures that you open like this:
a=open('BandL_my_replication_variance.fig');
b=open('BandL_my_replication_variance_c2.fig');
c=open('BandL_my_replication_variance_concave.fig');
s1=findobj(a,'type','Surface');
s2=findobj(b,'type','Surface');
s3=findobj(c,'type','Surface');
ax=axes(figure);
s1=copyobj(s1,ax);
s2=copyobj(s2,ax);
s3=copyobj(s3,ax);
close([a b c])
Then you can adjust the color on those surfaces like this:
s1.FaceColor='r';
s2.FaceColor='g';
s3.FaceColor='b';
And finally pick a view that you can see them like this:
view([32 23])
(I didn't copy over the x/y/z labels or add a legend but that part should be relatively simple)
3 件のコメント
Dave B
2021 年 10 月 18 日
How about something like this? I used a black plane that spans the limits of the x and y axes, but a bit of transparency so we can see the stuff under 0. Not sure that will accomplish your goal of differentiating but maybe? (your example above seemed to have all positive z)
surf(xlim,ylim,zeros(2),'FaceColor','k','FaceAlpha',.2)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!