LEGENDTITLE adds a title inside the legend axes.
LEGENDTITLE(LEGH,TITLESTR) adds the title TITLESTR to the legend LEGH
LEGENDTITLE(TITLESTR) adds the title to the current legend in the current axes.
LEGENDTITLE(...,Param,Val) sets the specified properties for the text object.
H = LEGENDTITLE(...) returns the handle for the text object used to create the title string.
By default, the legend title uses the same font as the legend, but with a bold font weight.
Example:
plot(rand(10,5))
legh = legend('Random 1','Random 2','Random 3','Random 4','Random 5');
legendtitle(legh,'Random Data')
Zitieren als
Steve Simon (2024). LEGENDTITLE (https://www.mathworks.com/matlabcentral/fileexchange/4561-legendtitle), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > Formatting and Annotation > Labels and Annotations > Title >
- MATLAB > Graphics > Formatting and Annotation > Labels and Annotations > Legend >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Image Arithmetic >
- MATLAB > Graphics > Graphics Objects > Graphics Object Properties >
Tags
Quellenangaben
Inspiriert: Add a title to a legend
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.1 | Updated license |
||
1.0.0.0 | Update to work in R14 and later. |