Is there a way to write legends in small caps?

조회 수: 2 (최근 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 CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by