Is there a way to write legends in small caps?

8 ビュー (過去 30 日間)
sudip poudel
sudip poudel 2020 年 5 月 15 日
回答済み: Vedant Shah 2025 年 3 月 10 日
Is there a way to write legends in small caps?

回答 (1 件)

Vedant Shah
Vedant Shah 2025 年 3 月 10 日
To display legends in small caps within MATLAB figure, try the following workaround:
  • Use the upper function to convert the text to uppercase.
  • Modify the FontSize property of the legend function to reduce the font size, thus creating an effect like small caps.
For more details on the above-mentioned functions, refer to the documentations using the following commands in MATLAB command line:
>> web(fullfile(docroot, "/matlab/ref/upper.html"))
>> web(fullfile(docroot, "/matlab/ref/legend.html"))
Here is an example code snippet to achieve the desired formatting:
legend(upper(Title1), upper('Title2'),'FontSize',7)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by