MATLAB: Colour mismatch between plot and legend

for looplegendplot

I don't know why the legend and plots don't match. I get the legend colours as defined below but the plot colours are all blue.
myh = line([xCenter, xCenter], [yCenter - yRadius(k2), yCenter + yRadius(k2)], ...
'LineWidth', 1, 'Color', [1,0,0]);
set(get(get(myh,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');
myh = line([xCenter - xRadius(k2), xCenter + xRadius(k2)], [yCenter, yCenter], ...
'LineWidth', 1, 'Color', [1,0,0]);
set(get(get(myh,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');
end

Best Answer

See if this thread helps--
Particularly, note the cyclist's answer...