Format colorbar using engineering notation
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
Harry Dymond
il 3 Lug 2020
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;
Categorie
Scopri di più su Graphics Object Properties in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!