Using 2010B.
I say:
h1=bar(x1, y1, 'r', 'stack');hold all;h2=bar(x2, y2, 'b', 'stack');[legend_h, object_h, plot_h, text_strings] = legend([h1 h2],'s1','s2');
When I inspect the plot I see that the colored boxes in the legend are both red in color.
I have just spent ages trying to play with all the children etc but to no avail.
Please can someone tell me how to change the color of the rectangle inside the legend box.
thanks!
Best Answer