How to align colorbar YTickLabel as middle/left/right?

3 ビュー (過去 30 日間)
raym
raym 2017 年 10 月 27 日
コメント済み: raym 2017 年 10 月 27 日
imshow('rice.png')
h = colorbar;
h.YTickLabel = cellstr([char(num2str([1,5000000,1000,5000,10000,15000]')),repmat(' (USD)',6,1)]);
The T tick lable is centralized, which is very ugly. I there a way to make it aligned left or right?
  3 件のコメント
raym
raym 2017 年 10 月 27 日
There is no option to align, and the only way to tweak is to adjust the input o f the TickLabel.
raym
raym 2017 年 10 月 27 日
To align left:
imshow('rice.png')
h = colorbar;
YTickLabels = strtrim(cellstr([char(num2str([1,5000000,1000,5000,10000,15000]')),repmat(' (USD)',6,1)]));
h.YTickLabel = YTickLabels;

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by