How do I get legend colors to match my plot colors ?

Here is my code: Plot and legend seem to not understand each other.
figure(1)
for j = [3,6,8,9,10,5]
hold all
plot(DataZero(:,j),DataZero(:,7),'LineWidth',0.5)
end
L = legend('LCenter','LN','LNN','LS','LSS','LW');
axis([-12 25 0 1400])
set(L,'Location','southeast')
hold off

Answers (0)

Asked:

on 7 May 2013

Community Treasure Hunt

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

Start Hunting!