Moving the position of the colorbar label

25 vues (au cours des 30 derniers jours)
Wissem-Eddine KHATLA
Wissem-Eddine KHATLA le 31 Mar 2024 à 16:21
Commenté : Wissem-Eddine KHATLA le 1 Avr 2024 à 8:41
Hello everyone,
Is there a way to move the position of the decimal power in the colorbar axis shown in the figure attached to this post ? More specifically, I want to move a little bit on the left.
Thank you in advance for your help,
Sincerely.

Réponse acceptée

the cyclist
the cyclist le 1 Avr 2024 à 1:04
Modifié(e) : the cyclist le 1 Avr 2024 à 1:08
It is possible to do so. I found out how from this answer.
figure
surf(1e7*peaks)
c = colorbar;
drawnow()
c.Ruler.SecondaryLabel.Units = 'normalized';
c.Ruler.SecondaryLabel.Position = [1 0.9];
I tried to run this code here, but got an error message. (According to this question, it seems there is a problem running code at Answers at the moment.) It runs on my local machine, though. In this case, I moved the label down from the default position. Adjust as you see fit.
  1 commentaire
Wissem-Eddine KHATLA
Wissem-Eddine KHATLA le 1 Avr 2024 à 8:41
@the cyclist thank you very much : it is exactly what I needed and to be honest I didn't know that Matlab could offer that level of customization ! Thank you again !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur White dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by