Plot multiple 2D contour plots in one 3D figure
30 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 8 月 21 日
回答済み: MathWorks Support Team
2019 年 8 月 28 日
I have multiple 2D contour plots that I'd like to plot in one 3D figure one on top of the other with some distance in between each of the plots. How to do this?
採用された回答
MathWorks Support Team
2019 年 8 月 28 日
You can achieve this by modifying the 'ContourZLevel' property of the contour plots. For example, the following plots two contour plots with some distance between them in the Z-direction:
[X,Y,Z] = peaks;
hold on
[~,h] = contour(X,Y,Z,20); % plot contour at the bottom
h.ContourZLevel = -9;
[~,h] = contour(X,Y,Z,20); % plot contour at the top
h.ContourZLevel = +9;
hold off
view(3);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!