Ältere Kommentare anzeigen
MATLABでグラフの凡例をTimes New Romanの字体に設定したいです。
グラフの設定画面から手動で設定することはできるのですが、作成するグラフが多い場合に困っています。
エディタ上でフォントを設定し、複数のグラフを作成した場合でも全ての凡例をTime New Romanにすることは可能でしょうか。
何か方法があれば教えてください。
Akzeptierte Antwort
Weitere Antworten (2)
Atsushi Ueno
am 24 Mai 2021
既存の凡例のフォントを設定したい場合:
下記の様に'Legend'オブジェクトを探して、その'fontName'を指定する事が出来ます
set(findobj('type', 'Legend'), 'FontName', 'Times New Roman');
注:現在開いているグラフィックオブジェクトの凡例を全て変更してしまうのでご注意ください。
Atsushi Ueno
am 24 Mai 2021
「既定値」(デフォルト値)をTimes New Romanの字体に設定するなら、
set(groot,'DefaultLegendFontName','Times New Roman');
プロパティを元の既定値('Helvetica')に戻すには'remove' キーワードを使用します。
set(groot,'DefaultLegendFontName','remove');
Kategorien
Mehr zu Legend finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!