How to modify the colobar settings?

Just a simple question!!
How can I obtain following requirement for the colorbar?
  • add units
  • move colobar tilte to the desired position

 Risposta accettata

You could try this:
c = colorbar;
units = ' m';
c.TickLabels{end} = [c.TickLabels{end} units];
c.Location = 'westoutside';

Più risposte (1)

meghannmarie
meghannmarie il 31 Ott 2019

1 voto

c = colorbar;
units = 'm';
c.TickLabels = cellfun(@(x) [x ' ' units], c.TickLabels, 'UniformOutput', false)
c.Position = [left,bottom, width,height];

2 Commenti

Thank you for the quick reply.
I just want to add the unit at the end of the colorbar, not for all.
c.Position also not working properly.
11.PNG
Like in this case!!!

Accedi per commentare.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by