Combined Legend for multiple axes

Versione 1.0.0.0 (1,62 KB) da Shreyes
Provide an array of axes handles or 1 figure handle.It will create a legend of all the lines in axes
397 download
Aggiornato 15 mar 2012

Visualizza la licenza

A simple demo to show how you can obtain the children object handles in plot determine their type and do something with it.

If you have multiple axes in one figure but wish to have one legend for all the lines in axes. The conventional way would be to provide all the handles of the lines in your axes to the built in function 'legend'. But instead use this method and just pass the figure handle.
This script will search for all the axes and the lines within it and provides the legend.
Also you can give an array of axes handles.

Since it uses the built in legend function all the options are supported.

Cita come

Shreyes (2025). Combined Legend for multiple axes (https://it.mathworks.com/matlabcentral/fileexchange/35662-combined-legend-for-multiple-axes), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2007b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Legend in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0