Line marker specifiers duplicated - subplot legend
Mostrar comentarios más antiguos
I am using subplots (3X4) in a figure. I have 9 plots which means in the third row, plots 10, 11, and 12 are free. I am trying to put my legend in the space of plot 10. Could anyone explain why there are some extra symbols creeping in between (shown inside the red circle in picture)? The relevant part of my code is as follows:
subplot(3,4,10)
axis off
plot(p1, 'ks', 'MarkerEdgeColor','k', 'MarkerFaceColor','w','MarkerSize',8);
axis off
plot(p2, 'ko', 'MarkerEdgeColor','k', 'MarkerFaceColor','k','MarkerSize',5);
hold on;
axis off
plot(p3, 'k^', 'MarkerEdgeColor','k', 'MarkerFaceColor','w','MarkerSize',7);
hold on;
axis off
plot(p4, 'k^', 'MarkerEdgeColor','k', 'MarkerFaceColor','k','MarkerSize',7);
hold on;
axis off
plot(p5, '-k', 'MarkerEdgeColor','k', 'MarkerFaceColor','k','MarkerSize',2);
hold on;
axis off
plot(p6, '--k', 'MarkerEdgeColor','k', 'MarkerFaceColor','k','MarkerSize',2);
hold on;
legend(...
'abc',...
'abc',...
'abc',...
'abc',...
'abc',...
'abc',...
'Location', 'North');
legend('boxoff')
title('Legend')

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Legend en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!