I know how to draw a grouped
BAR graph and a stacked
BAR graph as follows:
Y = round(rand(5,4)*10);
figure;
subplot(2,2,1); bar(Y,'grouped'); title('Group') % similar for 'hist'/'histc'
subplot(2,2,2); bar(Y,'stacked'); title('Stack')
This will create something like:
My question is that how can I combine settings grouped
and stacked
in the BAR chart , to be able to generate a figure similar to the following (3.4 stack together)? Or is there an alternative way to achieve this? Postscript I manually drew the following image.
source
share