In a color bar, how can I change to color of the ticks, number labels, and string label?
46 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Matthew Thompson
el 7 de Jul. de 2021
Respondida: Cris LaPierre
el 7 de Jul. de 2021
I can add a label and change its color as follows:
cbar = colorbar;
cbar.Label.String = 'Prob. Density';
cbar.Label.Color = [1,1,1];
I'd also like to make the tick marks and number labels white with something like cbar.Ticks.Color = [1,1,1], but can't quite find the right syntax.
0 comentarios
Respuesta aceptada
Cris LaPierre
el 7 de Jul. de 2021
cbar = colorbar;
cbar.Label.String = 'Prob. Density';
cbar.Color = "w";
set(gcf,'Color',[0.5 0.5 0.5])
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Colormaps 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!