How to plot multiple layers of heatmap as a function of a third variable in the z direction
조회 수: 2 (최근 30일)
이전 댓글 표시
I wonder how can I plot multiple layers of heatmap and arrange them a function of third vairable in the z direction? like the following image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/848575/image.png)
댓글 수: 0
답변 (1개)
Chunru
2021년 12월 31일
[X,Y,Z] = meshgrid(-2:.2:2);
V = X.*exp(-X.^2-Y.^2-Z.^2);
zslice = [-1.2,0,1.2];
yslice = [];
xslice = [];
slice(X,Y,Z,V,xslice,yslice,zslice)
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!