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
LEGENDGRID(H,string1,...,stringN, numHandlesPerColumn)
numHandlesPerColumn is a 1-by-M matrix with sum(numHandlesPerColumn) = N (number of handles)
The location by default is 'SouthOutside'.
LEGENDGRID(AX, ...)
LEGENDGRID(..., strTitles)
LEGENDGRID(..., 'name1', value1, 'name2', value2, ...)
can use as parameters 'fontSize', 'markerSize' and 'lineWidth'
Examples:
x = 0:.2:12;
h = plot(x,bessel(1,x),x,bessel(2,x),x,bessel(3,x));
str_legend = {'First','Second','Third'};
numHandlesPerColumn = [1 1 1];
lg = legendGrid(h, str_legend, numHandlesPerColumn, ...
'LineWidth', 2, 'fontSize', 20);
b = bar(rand(10,5),'stacked'); colormap(summer); hold on
x = plot(1:10,5*rand(10,1),'marker','square','markersize',12,...
'markeredgecolor','y','markerfacecolor',[.6 0 .6],...
'linestyle','-','color','r','linewidth',2); hold off
legendGrid([b,x],'Carrots','Peas','Peppers','Green Beans',...
'Cucumbers','Eggplant', [3 3])
b = bar(rand(10,5),'stacked'); colormap(summer); hold on
x = plot(1:10,5*rand(10,1),'marker','square','markersize',12,...
'markeredgecolor','y','markerfacecolor',[.6 0 .6],...
'linestyle','-','color','r','linewidth',2); hold off
legendGrid(b,'Carrots','Peas','Peppers','Green Beans',...
'Cucumbers', [3 2])
b = bar(rand(10,5),'stacked'); colormap(summer); hold on
x = plot(1:10,5*rand(10,1),'marker','square','markersize',12,...
'markeredgecolor','y','markerfacecolor',[.6 0 .6],...
'linestyle','-','color','r','linewidth',2); hold off
legendGrid([b,x],'Carrots','Peas','Peppers','Green Beans',...
'Cucumbers','Eggplant', [2 2 2])
Author: Mar Callau Zori
Date: 7/20/2012
version: 1.0
Citation pour cette source
Mar Callau-Zori (2026). legendGrid (https://fr.mathworks.com/matlabcentral/fileexchange/37583-legendgrid), MATLAB Central File Exchange. Extrait(e) le .
Informations générales
- Version 1.0.0.0 (3,51 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.0.0.0 |
