Filled contour/colorized 2-D surface plot with large 3-D array (10000 x 3)
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (1)
Mathieu NOE
le 11 Avr 2023
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 commentaires
Aditya
le 11 Avr 2023
Mathieu NOE
le 12 Avr 2023
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 ?
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
