edit color of colorbar scaling-factor
5 views (last 30 days)
Show older comments
Thomas Ernst
on 23 Apr 2019
Answered: Thomas Ernst
on 25 Apr 2019
Dear experts,
when using a colorbar in front of a dark background I wish to set the font color to white. Editing the Colorbar color propertiy does that nicely
mycolorbarhandle.Color = [1 1 1]
However, whenever the automatic scaling takes place, i.e. my colorbar "decides" not to display the value 13000 but instead the value 1.3 and a little "x10^4" text is added, this multiplier of x10^4 will always be displayed black, not in the font color I chose before. So far I have been unable to identify which handle is resposible for this "x10^4" text label.
Has anybody encountered a similar problem and has found a solution? I'd also appreciate siggestions on whre to find the handle for this text.
Thank you!
1 Comment
Adam Danz
on 23 Apr 2019
The exponential notation changes color correctly when I try it. Try editing the color after you've made all other changes to the axes. If that doesn't help, share some reproducible code.
surf(peaks*10000000)
ch = colorbar;
ch.Color = 'r'; %change to red
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!