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

17 ビュー (過去 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 Center および File ExchangeColor and Styling についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by