Scatter3 with weights
2 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
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
7 个评论
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
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 Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!