Adapt my colorbar to a specific value

36 visualizaciones (últimos 30 días)
Gaétan Andriano
Gaétan Andriano el 13 de Dic. de 2022
Respondida: Gaétan Andriano el 16 de Dic. de 2022
Here is an example of a figure that you can find in the matlab help with the colorbar function.
My interrogation is very simple. I would like to set a specific color at a specific value on the colorbar. For instance, I would like to have cyan at 4 rather than 0. I don't just want to replace the color there, the goal is to adapt the rest of my colorbar to that value. In my example, I would like the blue shades to be between -6 and 4 and the rest of the colors to be between 4 and 8.
Anyone can help me please ?

Respuesta aceptada

Gaétan Andriano
Gaétan Andriano el 16 de Dic. de 2022

Más respuestas (1)

Jiri Hajek
Jiri Hajek el 14 de Dic. de 2022
Seems like you need to focus on colormap, that's the function which defines your color scale. Or maybe just change the scale for your plot, that way you may be able to shift the color levels, if that's sufficient for you.
  5 comentarios
Gaétan Andriano
Gaétan Andriano el 16 de Dic. de 2022
Thanks for your help and I hope this link could help other users of Matlab

Iniciar sesión para comentar.


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

Community Treasure Hunt

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

Start Hunting!

Translated by