Format colorbar using engineering notation
古いコメントを表示
How can I set the scale of a color bar to use exponential notation, with all exponents being a multiple of 3?
I know that format shortEng will set the format I want for values printed to the Command Window, but I cannot find anything to format string printed elsewhere using this format.
採用された回答
その他の回答 (1 件)
Harry Dymond
2020 年 7 月 3 日
A little late for the OP perhaps, but:
- My num2eng FEX submission will process colorbars to update the tick labels, and keep them updated if the data in the associated axes change. Just pass the handle of the colorbar to num2eng.
- It sounds like, from your comment to Star Strider, that this isn't actually what you want. You want to have a "global" exponent for the colorbar, and for this to be a multiple of three. For this, you need to use the colorbar's hidden .Ruler.Exponent property. e.g.:
barH = colorbar; barH.Ruler.Exponent = 9;
カテゴリ
ヘルプ センター および File Exchange で Graphics Object Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!