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

조회 수: 45(최근 30일)
alpedhuez
alpedhuez 2021년 8월 21일
댓글: alpedhuez 2021년 8월 23일
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.

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 8월 21일
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
alpedhuez
alpedhuez 2021년 8월 23일
Thank you. Let me work on it.

댓글을 달려면 로그인하십시오.

추가 답변(0개)

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by