How to modify the colobar settings?

1 Ansicht (letzte 30 Tage)
Ravindu Lokuliyana
Ravindu Lokuliyana am 31 Okt. 2019
Beantwortet: meghannmarie am 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

Akzeptierte Antwort

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

Weitere Antworten (1)

meghannmarie
meghannmarie am 31 Okt. 2019
c = colorbar;
units = 'm';
c.TickLabels = cellfun(@(x) [x ' ' units], c.TickLabels, 'UniformOutput', false)
c.Position = [left,bottom, width,height];
  2 Kommentare
Ravindu Lokuliyana
Ravindu Lokuliyana am 31 Okt. 2019
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.
Ravindu Lokuliyana
Ravindu Lokuliyana am 31 Okt. 2019
11.PNG
Like in this case!!!

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by