colouring dots in scatter3 according z-value
Show older comments
plot3 gives colours according to height above the xy-plane. Is that possible with scatter3 too?
Accepted Answer
More Answers (2)
Weia Reinboud
on 18 Sep 2017
2 votes
1 Comment
José-Luis
on 18 Sep 2017
You can specify the color as a linear function of z:
x = 1:10;
z = fliplr(x);
scatter3(x,x,z,2,z)
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!