Clear Filters
Clear Filters

my colorbar exponent mark is located at bottom

2 views (last 30 days)
yeah, the exponent mark is at the bottom right instead of the upper left. my code is like this
imshow(myData,[]), colorbar
set(gca, 'FontSize', 20, 'FontWeight', 'bold')
this problem will occur sometimes, It's so annoying.

Accepted Answer

Walter Roberson
Walter Roberson on 9 Apr 2016
The exponent mark is always on the same side as the tick labels for the axes. You have tick labels for the colorbar, which is a different axes than the image is in.
If you are using R2014a or earlier, then your only way of controlling the exponent is to set the YTickLabel strings -- the exponent only appears if the label mode is auto instead of manual.
If you are using R2014b or R2015a then the method of controlling the exponent is undocumented (but I think it was discovered and posted by someone.)
If you are using R2015b or later, then you can use the new axes YAxis field which has several properties including Exponent and ExponentMode -- however I do not see any way of controlling whether it appears at the top or bottom when it automatically appears.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!