I have a series of 3D data points (x,y,z) , How can plot the histogram of these points and see the frequency of these location (the distribution of frequency of data)?

조회 수: 15 (최근 30일)
I have a series of 3D data points (x,y,z) , How can plot the histogram of these points and see the frequency of these location (the distribution of frequency of data)?

답변 (1개)

Image Analyst
Image Analyst 2014년 5월 24일
You can do scatter3 and let the marker size be an indication of the number of counts.
Or, since it's analogous to a color image (which is a 3D array also), you can use the color frequency image. It assigns an intensity to each data point based on how frequently that data point (color or x,y,z value) shows up in the image. See http://www.mathworks.com/matlabcentral/fileexchange/28164-color-frequency-image for an example and code.
  댓글 수: 2
Daniel Bridges
Daniel Bridges 2016년 4월 2일
A set of 3D points is not equivalent to a color image unless one sums the third axis, effectively losing data; otherwise points will "lie on top of each other" when viewing a given plane: (1,2,5) and (1,2,-5) are coincident when looking at the plane containing the "pixel" (1,2).
I do not see that this answer helps beyond supplying a method of visualization: Looking at the scatter3 documentation, it seems you can only adjust the marker size after creating the histogram Tavakkoli has mentioned.
Image Analyst
Image Analyst 2016년 4월 2일
The first paragraph is not at all what I was talking about.
You're right in the second paragraph that once you have the 3-D histogram, which is trivial to construct with a triple nested for loop, that that histogram then gets passed in to scatter3() along with size and color arrays that indicate the height (count) of the histogram bin. It is a method of visualization as you say, and is what he asked for. I'm not sure what "beyond" would mean to you. Was I supposed to give the triple nested for loop for computing the histogram? He didn't ask for that - he asked only for a way to plot (visualize) the histogram, not create it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by