Making a 3D Density plot given Density at each point (X,Y,Z)
48 次查看(过去 30 天)
显示 更早的评论
I have a 3D matrix where each element corresponds to the density at point (X,Y,Z), see attached. The coordinates and data are loaded by the below code. The first two axis of xyPhi correspond to xh and yh, and the third axis corresponds to z. I would like to do a 3D density plot using this data, it should look something like a puck. I essentially want the equivalent of ListDensityPlot3D in Mathematica. Here is what the plot looks like in mathematica
M=60;%number of radial spatial lattice points
N = 60; %number of z-axis lattice points
R = 15;
Z = 14;
dr=double(2*R/(2*M+1));
dz = 2*Z/N;
xh = dr*(-M:1:M);
yh = dr*(-M:1:M);
z = -Z*ones(N+1,1) + dz*(0:1:N).';
load('phi_cylind_film_xy','xyPhi')
0 个评论
回答(1 个)
Vinayak
2022-10-20
MATLAB provides a variety of plots for visualization such as line plots, scatter charts, animated plots etc.
More on the different types of plots provided can be found here
To plot data with density, you can have your data converted to matrices and use the mesh and surface plots.
More on this can be found here, https://www.mathworks.com/help/matlab/surface-and-mesh-plots-1.html
0 个评论
另请参阅
类别
在 Help Center 和 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!