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

60 ビュー (過去 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 件のコメント
Cris LaPierre
Cris LaPierre 2021 年 8 月 21 日
Perhaps this answer can help?
alpedhuez
alpedhuez 2021 年 8 月 23 日
Thank you. Let me work on it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by