bars are stacked instead of grouped while 'grouped'
1 view (last 30 days)
hi guys, does anybody maybe know why my bars keep being stacked instead of grouped??
qual = readmatrix('qualtrics_srec.txt');
qual_jong = readmatrix('qualtrics_srec_jong.txt');
qual_oud = readmatrix('qualtrics_srec_oud.txt');
Scott MacKenzie on 22 Jun 2022
Edited: Scott MacKenzie on 22 Jun 2022
To group the bars, use something like this:
qual = rand(57);
qual_jong = rand(29);
qual_oud = rand(29);
d = [qual(57,3:14); qual_jong(29,3:14); qual_oud(29,3:14)];
bar(d); % or use d' depending on the desired grouping
The 'grouped' modifier has no effect in your code because the data in each bar function are just a vector.