How to plot a 3D contour plot when the contours is a forth vector
古いコメントを表示
Hello,
I have a set of data X,Y,Z,A. I would like to plot A in 3D. Not sure how to proceed.
It would be nice to have contour plots for A as a function of x,y,z
Is this possible?
Thank you
回答 (1 件)
Star Strider
2024 年 9 月 9 日
0 投票
5 件のコメント
Robert Jones
2024 年 9 月 9 日
Robert Jones
2024 年 9 月 9 日
I was considering something like this —
[X,Y] = ndgrid(-5:0.1:5);
Z = exp(-(X.^2+Y.^2)*0.2)*50;
A = sort(rand(15,1))*30+10
figure
surf(X,Y,Z, 'EdgeColor','interp', 'FaceColor','interp')
hold on
contour3(X, Y, Z, A, '-k')
hold off
colormap(turbo)
hcb = colorbar;
hcb.Label.String = '°C';
.
Robert Jones
2024 年 9 月 11 日
Star Strider
2024 年 9 月 11 日
My pleasure!
カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
