Filled contour/colorized 2-D surface plot with large 3-D array (10000 x 3)
이전 댓글 표시
Hi!
Can you please help me generate a filled contour plot and/or a colorized 2-D surface plot using a large 3-D array (10000 x 3; see attached file)? The data is arranged in the following format: x-coordinate, y-coordinate and density.
I am hoping to visually end up with something like this (i.e., with minimal interpolation):
Thanks so much!
채택된 답변
추가 답변 (1개)
Mathieu NOE
2023년 4월 11일
hello
maybe this ?
your data is large but lacks some refinement in the central area of the peak
90% of your data is Z close to zero
3D rendering

if we make a flat 2D rendering you will see that we have a very coarse grid in the center area
zoomed here :
load('test_data.mat')
x = D(:,1);
y = D(:,2);
z = D(:,3);
%% Plot it with TRISURF
tri = delaunay(x,y);
h = trisurf(tri, x, y, z);
set(h,'LineWidth',0.01)
shading interp
% view(2); % uncomment to have a flat 2D rendering
colorbar EastOutside
댓글 수: 2
Aditya
2023년 4월 11일
Mathieu NOE
2023년 4월 12일
sorry if I was unclear
I didn't mean that the resolution was coarser in the center, I just mean that the overall resolution is too coarse to give a smooth rendering of what is supposed to be displayed
also , we could reduce the number of points as outside the very center portion, the rest is almost zero in z direction, so not very interesting
yes , if you display the data with scatter, you can see that the number of points where the z data is non zero is very limited
you may try to improve with interp2 but don't do it on the full data set , simply on the center area
how were the data actually generated ?
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
