I got an error ignoring extra legend entries.

x = [data2bl;data3bl;data4bl;data5bl];
for index = 1:2000
if index <= 500
Origin(index,:) = 'Smell1';
end
if index >=501 && index <=1000
Origin(index,:) = 'Smell2';
end
if index >=1001 && index <=1500
Origin(index,:) = 'Smell3';
end
if index >=1501 && index <=2000
Origin(index,:) = 'Smell4';
end
end
%Dendrogram plot
figure(12)
[d,p,stats]= manova1(x,Origin);
manovacluster(stats,'single');
title('Dendrogram plot of Basic Smell');
ylabel('Similarity level');
xlabel('Sample type')
grid on;
h=legend('Banana','Rose','Strawberry','Vanilla',2);

Respuestas (1)

Thorsten
Thorsten el 14 de Abr. de 2015
h = legend({'Banana' 'Rose' 'Strawberry' 'Vanilla'})

2 comentarios

Still the same error
Warning: Ignoring extra legend entries.
> In legend at 286
Thorsten
Thorsten el 16 de Abr. de 2015
It's not an error, but a warning. It says that you have fewer curves plotted than you have labels in your legend.

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

el 14 de Abr. de 2015

Comentada:

el 16 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by