- 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.
Is there a way to write legends in small caps?
4 次查看(过去 30 天)
显示 更早的评论
Is there a way to write legends in small caps?
0 个评论
回答(1 个)
Vedant Shah
2025-3-10
To display legends in small caps within MATLAB figure, try the following workaround:
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!