Overlay barchart with subplots
Show older comments
Hi , i am trying to generate a overlay subploted bar chart with this data combined1 and combined 2
I want to see the different columns overlayed in the subplot with diferent colors but now i can only see the figure attached
combined1 = rand(10,5)
combined2 = rand(10,5)
ret_combined = [combined1];
ret_combined2 = [combined2];
f = figure; ax = axes(f); hold(ax, 'on')
subplot(2,1,1);
arrayfun(@(x1) bar(ret_combined(:, x1), 'stacked'), 1:5);
subplot(2,1,2);
arrayfun(@(x1) bar(ret_combined2(:, x1), 'stacked'), 1:5);
ax = gca;
Accepted Answer
More Answers (0)
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



