Did you solve this problem?
Im trying to do something similar.
You can write your data as a matrix, where each col is a group.
For example: for two groups and 5 categories.
My data is number of car for 5 diferent colors at 2 different brands.
Lets say we have
Brand 1 brand 2
red 5 3
blue 4 1
green 3 4
yellow 1 3
orange 0 5
you can write that as a matrix
Data = [5,3;
4, 1;
3, 4;
1, 3;
0, 5];
then use
b = bar(Data)
and if you want to modify the colors of the bars... this will do the job
b(1).FaceColor = 'b'
b(2).FaceColor = 'r'
Then you can place your thicks
xticklabels ({'red','blue','green','yellow','orange'})
and thats it!
Best regards,
F.Bello