Creates a legend with a specified number of columns
Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
Note de l’éditeur : This file was selected as MATLAB Central Pick of the Week
As of Matlab 2018a, legend() now supports columns, so function will no longer be maintained: https://www.mathworks.com/help/matlab/ref/legend.html#d117e809522
Updated 9/8/16: Added new legend positions (e.g. northeastoutside) and better positioning.
usage:
numlines = 5;
r = rand(10,numlines);
plot(r);
columnlegend(2, cellstr(num2str([1:numlines]')), 'location', 'northeastoutside');
PRINTING: If you want to print the figure, you'll have to use a command line printer (e.g. export_fig) as the File->Print option embedded in the figure resets the figure properties including the legend
Citation pour cette source
Simon Henin (2026). simonhenin/columnlegend (https://github.com/simonhenin/columnlegend), GitHub. Extrait(e) le .
Remerciements
A inspiré : freelegend(hline,hax,hf,str,posi,varargin), gridLegend - a multi column format for legends
Informations générales
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
Les versions qui utilisent la branche GitHub par défaut ne peuvent pas être téléchargées
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 3.0.0.1 | Note about support |
||
| 3.0.0.0 | Add more legend locations and better positioning |
||
| 2.0.0.0 | + Updates for compatibility with 2015a
|
||
| 1.9.0.0 | Bug fix |
||
| 1.7.0.0 | Updates/Bug Fixes |
||
| 1.6.0.0 | removed hidden files. |
||
| 1.5.0.0 | Minor bug fix |
||
| 1.4.0.0 | Added functionality when using markers. |
||
| 1.2.0.0 | Add instructions for printing figure with columns |
||
| 1.1.0.0 | Removed Mac OS hidden files from zip file. |
||
| 1.0.0.0 |
