This short function will generate a legend based on 'Tag' information given by plot. A legend title is also possible.
figure; hold on; x = 1:10; plot(x,x,'Tag','Positive'); plot(x,-x,'Tag','Negative'); labelplot('eo','v','Slope');
The above example is equivalent to
legend('Positive','Negative')
and adding a text box 'Slope' above it.
Zitieren als
Will Robertson (2024). labelplot (https://www.mathworks.com/matlabcentral/fileexchange/11234-labelplot), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Erstellt mit
R2006a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Legend finden Sie in Help Center und MATLAB Answers
Tags
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.1.0.0 | Add BSD licence. |
||
1.0.0.0 |