Matlab colorbar peak value with exponentials
2 views (last 30 days)
Show older comments
How can I control or monitor the exponential used in my colorbar?
Context: I am displaying an image and want to superimpose numbers (data values) on the image that will correspond (ignoring the exponential) to the numbers used in the colorbar beside the image.
My problem is that when I specify the following peak values, the associated exponentials in the colorbar are used:
Max val ______ Peak exponential
1.0e-5 ______ 10 X 10^-6
1.2e-5 ______ 1.2 X 10^-5
1.5e-5 ______ 15 X 10^-6
1.6e-5 ______ 1.6 X 10^-5
When I look deeper, the transition points between showing 10^-5 and 10^-6 seem pretty arbitrary (ie. 1.2748e-5 vs 1.2749e-5 displays exponentials of 1.2X10^-5 and 12X10^-6 respectively). The code I use to control the colorbar max/min is:
bots = 0; tops = 1.0e-5;
imagesc(A,[bots tops]);
Thanks,
Mike
0 Comments
Answers (2)
Walter Roberson
on 6 Jun 2012
The only way to control the exponential is to set its axes tick labels manually. (A colorbar is actually an extra axes with a simple graphic drawn on it.)
See Also
Categories
Find more on Colorbar 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!