I have created an array of colors to loop over when outputting different plots.
Somewhere in the code it is broken. I am getting no errors, but yet the colors output does not represent the color array. It outputs the last color in the array for all lines in the color black.
figure1 = figure('Color','w');
apples = [3 5 6 3 2]
oranges = [2 3 4 5 6]
grapes = [3 4 3 2 5]
count = [1 2 3 4 5]
C = {'b','r','g','m','k'}
hold on
for i = 1:5
line(count, apples, 'LineStyle','-','LineWidth', 2, ...
'Marker','x', 'MarkerSize',10, 'Color',C{i},'DisplayName','apples');
line(count, oranges, 'LineStyle','-', 'LineWidth', 2, ...
'Marker','.', 'MarkerSize',10, 'Color',C{i},'DisplayName','oranges');
line(count, grapes, 'LineStyle','-', ...
'Marker','.', 'MarkerSize',10, 'Color',C{i},'DisplayName','grapes' );
end
hold off


irange from 1 to 5?C{i}toC{1},C{2}andC{3}. You've already duplicated the plot statements, you don't need to repeat them again.