How to have a discrete color bar for scatter3?
Show older comments
Hi all,
I have here residual errors as function of variable X and Y. The error ranges from 0 to (I think maximum) 3.7 something...
How can I have a discrete color for the marker and the color bar? Let's say that for error values from:
r < 0.5 --> color dark blue
0.5 < r < 1.0 --> color green
1.0 < r < 2.0 --> color yellow
2.0 < r --> color red
I have used scatter3 for the plot, the code looks like this:
scatter3(variable_X,variable_Y,residual_errors,[],residual_errors,'filled')

Thanks for your help!
Accepted Answer
More Answers (1)
Makarand
on 27 Apr 2018
0 votes
Try colorbar_levels
Categories
Find more on Blue in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!