subtitle on a 2x2 grid plot using sgtitle?

43 vues (au cours des 30 derniers jours)
Michael O'Brien
Michael O'Brien le 16 Juin 2022
Commenté : Voss le 16 Juin 2022
I have a 2x2 subplot with a 2 line title using a multiline cell array tile;
sgt = sgtitle({folderName,fileName});
which works fine.
What I would like is to be able to change the properties of the individual lines of text i.e. the first line (folderName) to be bold and 2 points bigger in fontsize.

Réponse acceptée

Voss
Voss le 16 Juin 2022
Modifié(e) : Voss le 16 Juin 2022
folderName = 'MATLAB folder';
fileName = 'test.m';
sgt = sgtitle({['{\bf\fontsize{14}' folderName '}'],fileName});
  2 commentaires
Michael O'Brien
Michael O'Brien le 16 Juin 2022
you absolute donny don!
thank you, Voss!
Voss
Voss le 16 Juin 2022
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by