How can I change tickformat in the colorbar.

30 次查看(过去 30 天)
How can I change tickformat in the colorbar. Regards.
  2 个评论
Pawel Jastrzebski
Pawel Jastrzebski 2018-3-13
  • What is your current formatting?
  • What do you want to change it to?
  • Have you checked if the answer to your question isn't in the example section of the colorbar doc?
Yrobel Lima
Yrobel Lima 2018-3-13
Hi, thanks for your reply, I want to change is the number format of the colorbar label. Thanks.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2018-3-14
cb = colorbar();
cb.YRuler.TickLabelFormat = '%.2f';
  4 个评论
jonas
jonas 2019-12-21
the following works in 2019a:
cb.Ruler.TickLabelFormat
Note: 'Ruler' and not 'YRuler'.
Walter Roberson
Walter Roberson 2019-12-21
Thanks, jonas. This is a detail that changed at some point.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by