MATLAB Answers

0

How to modify the colobar settings?

Asked by Ravindu Lokuliyana on 31 Oct 2019
Latest activity Answered by meghannmarie on 5 Nov 2019
Just a simple question!!
How can I obtain following requirement for the colorbar?
  • add units
  • move colobar tilte to the desired position

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by meghannmarie on 5 Nov 2019
 Accepted Answer

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

  0 Comments

Sign in to comment.


Answer by meghannmarie on 31 Oct 2019

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

  2 Comments

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!!!

Sign in to comment.