How to set default font size and style?
Afficher commentaires plus anciens
In R2015a, how do I set the default text for plot titles, ticklabels, and axes labels to 12 point normal font?
Réponse acceptée
Plus de réponses (2)
Timothy Dalrymple
le 10 Juin 2020
Modifié(e) : Timothy Dalrymple
le 10 Juin 2020
2 votes
I can't promise that his works in all cases, but I include this line at the top of my code and it sets all plots in my code.
So, I just skip the use of graphics root object (groot) set(groot,'defaultFontName','Verdana')
set(0, 'DefaultAxesFontSize', 18);
Mayra
le 30 Juin 2021
You should use:
set(groot,'defaultAxesFontName','Verdana')
set(groot,'defaultAxesFontSize',12)
And it is possible to set as default several things, for that you need the right class name, to check them:
d = get(groot,'factory');
Substitute factory to default.
To have this setup everytime you open matlab add a startup.m file to your userpath. There is a better explanation about it here: https://blogs.mathworks.com/steve/2019/02/22/making-your-plot-lines-thicker/
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!