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.
Cita come
Will Robertson (2024). labelplot (https://www.mathworks.com/matlabcentral/fileexchange/11234-labelplot), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2006a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Legend in Help Center e MATLAB Answers
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.