Y = [-3,-2;2,1;1,-1;4,3;-1,4];hb = bar(Y);hbc = get(hb, 'Children');set(hbc{1}, 'FaceColor', 'r');set(hbc{2}, 'FaceColor', 'g');legend('old','new');
The above code generates a bar graph with two sets of overlaying bars. I changed the default bar color for each set of bars, but the legend as it stands does not reflect these changes. How can I correct this?
Thanks.
Best Answer