How do I position a label below a colorbar?
Show older comments
Is there a way to add a label below a colorbar, as shown in the pic?

I am able to add a label (title) on top of the colorbar, though I am unsure how to position 'Label2' at the bottom of the colorbar so that it uniformly reflects 'Label1', despite having to adjust clims.
plot(1, 1);
c1 = colorbar;
c1.Title.String = 'Label1';
str = 'Label2';
set(get(c1, 'xlabel'), 'string', str, 'rotation', 0);
2 Comments
Priyank Pathak
on 22 Sep 2022
@dpb how can we label at top of colorbar?
Priyank Pathak
on 22 Sep 2022

@dpb, how is it possible to make label at top of colorbar and height(colorbar and label ) and data plot height will be matched?
Accepted Answer
More Answers (0)
Categories
Find more on Annotations 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!