Scatter3 with weights

조회 수: 6 (최근 30일)
Gabriella Tany
Gabriella Tany 2018년 5월 1일
댓글: sloppydisk 2019년 1월 12일
Hi,
I want to make a scatterplot of x, y, z coordinates and include the weight (which differs per particle) the locations have. So every particle has a specific weight and I want to combine all the weight of all the particles that have the same coordinates and visualize it as a heat plot. Is this possible?
Thanks!

채택된 답변

sloppydisk
sloppydisk 2018년 5월 1일
You could pass color values as follows
n = 1000;
X = rand(n, 1); Y = rand(n, 1); Z = rand(n, 1); C = hypot(X, Y);
size = 500;
scatter3(X, Y, Z, size, C, '.');
colormap jet
Or do you want to take a slice along the xy-plane? Then you should probably look at this page .
  댓글 수: 7
Kayode Adetunji
Kayode Adetunji 2019년 1월 12일
Hi, Please did you find out how to directly add weights to data points, especially depending on a condition? And also the consideration of data points of same location?
I will appreciate your feedback. I am struglling with this aspect. Thank you.
sloppydisk
sloppydisk 2019년 1월 12일
Do you want to add the weights to the color or to the size of the data points? In what way should they depend on a condition? Please state your problem more clearly.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by