In a color bar, how can I change to color of the ticks, number labels, and string label?

18 次查看(过去 30 天)
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.

采纳的回答

Cris LaPierre
Cris LaPierre 2021-7-7
cbar = colorbar;
cbar.Label.String = 'Prob. Density';
cbar.Color = "w";
set(gcf,'Color',[0.5 0.5 0.5])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Color and Styling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by