Set interval for colorbar

59 visualizaciones (últimos 30 días)
BN
BN el 30 de Mayo de 2020
Comentada: Hasan Jamil Apon el 12 de Abr. de 2021
Dear all, I used
colormap bone
colorbar
But I want to have a color bar like this (intervals splite colors like this):
I searched and used this:
colorbar('Ticks', 0:0.1:1);
But it does not work and doesn't change anything. Any advice is highly appreciated.
Thank you in advance

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 30 de Mayo de 2020
Try this
intervals = 0:0.1:1;
clrs = bone(2*numel(intervals)-2);
colormap(clrs);
colorbar
  1 comentario
Hasan Jamil Apon
Hasan Jamil Apon el 12 de Abr. de 2021
If I want to set color limit for 3D plot,then what sort of changes I have to make? Like I want the red color for the Z axis value between 0.8 to 0.93, cyan color for Z axis value between 0.93 to 0.95, yellow color for Z axis value between 0.95 to 1 for given X and Y values. I want to indicate only these 3 colors. Please give me some guidance in this issue. Will be really be grateful!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by