Discrete color scale in 3D plot
Mostra commenti meno recenti
The following code produces a strip in the middle of a flat base. How can I adjust the color bar so that I can use only one color to represent the data range [0 2), one color for (2 4], one color for (4 6], and so on? So the color on the strip will be discrete on each level, rather than a continuous transition.
img = zeros(101,101);
img(51,51) = 10;
% let's try discrete color scale
surf(img)
shading interp
colorbar
axis tight

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Blue in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

