How to make a Part a and Part b bar chart
2 views (last 30 days)
Show older comments
Hi everyone
I have a set of data that is in a Part A and a Part B style, and I would like to present it in a bar chart. Ideally the category labels would be "Part A" and "Part B", and the bars in Part A would all be one colour and the bars in Part B would all be another colour.
Please help, thanks Sally
So far I have...
Data = [3.13 3.14 3.13 3.13 3.13 3.11 3.12 3.18 3.16 3.16 3.16 3.16 3.15 3.20 3.20;... 3.14 3.14 3.15 3.15 3.18 3.11 3.11 3.11 3.11 3.11 3.12 3.10 3.11 3.12 3.18];
figure b = bar(Data,'grouped');
ylabel('Data')
ylim([3.06 3.22])
0 Comments
Answers (1)
KSSV
on 7 Jun 2017
partA = rand(10,1) ;
partB = rand(10,1) ;
bar(1:10,partA, 'r')
hold on
bar(11:20,partB, 'b')
See Also
Categories
Find more on Dialog Boxes 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!