How can one change the font for graphics to sans serif?

59 visualizaciones (últimos 30 días)
alpedhuez
alpedhuez el 21 de Ag. de 2021
Comentada: alpedhuez el 23 de Ag. de 2021
https://www.mathworks.com/matlabcentral/answers/49446-how-can-i-change-the-fontface-of-a-text-within-a-plot
shows
set(gca, 'FontName', 'Times New Roman')
changes the font face of text in graphics. Then how can one change it to Sans Serif? I have tried
set(gca, 'FontName', 'Sans Serif')
But this did not help.

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 21 de Ag. de 2021
Use listfonts to determine what fonts are available on your system.
I suspect the issue here is one of spelling. In my system, it would be 'SansSerif'
set(gca, 'FontName', 'SansSerif')
  5 comentarios
alpedhuez
alpedhuez el 23 de Ag. de 2021
Thank you. Let me work on it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by