I have a stacked bar graph with several values and I want a 6th value that is not stacked. In the graph below I want the "shear demand at M_n" bar to be gray for example, and have its own spot in the legend. I can't figure out how to separate it from the other values though. Here is the code to produce the figure below:
estcap=[157.75 34.07; 94.34 84.57; 135.73 72.55; 70.16 13.07; 109.76 31.16; 0 146.15];actcap=[159.4];figure('name','A1, a/d = 2.5');barg=bar(estcap, 'stacked','linewidth',1.5);hold onplot(xlim,[actcap actcap], '-k','linewidth',2);legend('Steel Contribution','Concrete Contribution','Shear Demand at Failure','location','northoutside');ylabel('Capacity (kips)');Labels = {'1973-STD','ACI', '2012-SIMP', '2012-GEN', '2004-AASHTO','Shear Demand at M_n'};set(gca, 'xtick',1:6, 'XTickLabel', Labels,'XTickLabelRotation',45); colormap grayset(gca,'Linewidth',1.5);hold off
I hope that makes sense, thanks in advance for any help.
Best Answer