Plot multiple 2D contour plots in one 3D figure
조회 수: 4 (최근 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!