Colorbar is not representing my current colormap correctly
Show older comments
Hi There! I made myself a semy custom colormap based on jet with a custom length. I then assign other values I have to each of the colors. In a plot, I plot points colored based on this assignment. When I then use colorbar, it does not contain all of the colors that should be in the colormap. The values that colors get assigned to are negative and positive.
In my sample, I clearly get some bright red spots that are not represented by the colorbar.
here is some sample code:
% sample code
test = rand(2000,3);
colormap = jet(2000);
scatter3(test(1:end,1), test(1:end,2), test(1:end,3),30,colormap,'filled');
colorbar;
Accepted Answer
More Answers (0)
Categories
Find more on Blue 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!