2 boxplots overlayed - how to
이전 댓글 표시
Hi,
I have two boxplots created from information that the code is reading from different tables named "dataraw_BPM_XXXX".
Each boxplot is reading information from two columns ('subject ID' and 'Value') of one of the tables.
Code below for reference:
figure (3)
boxplotMeanRelaxing_SubjectID = dataraw_BPM_RELAXED.SUBJECT_ID
boxplotMeanRelaxing_Value = dataraw_BPM_RELAXED.VALUE
boxplot(boxplotMeanRelaxing_Value ,boxplotMeanRelaxing_SubjectID)
title('BPM readings per subject condition A')
xlabel('Subject ID')
ylabel('BPM readings during condition A')
figure (4)
boxplotMeanAROUSING_SubjectID = dataraw_BPM_AROUSED.SUBJECT_ID
boxplotMeanAROUSING_Value = dataraw_BPM_AROUSED.VALUE
boxplot(boxplotMeanAROUSING_Value ,boxplotMeanAROUSING_SubjectID)
title('BPM readings per subject condition B')
xlabel('Subject ID')
ylabel('BPM readings during condition B')
I'd like to overlay the two boxplots in a way that allows me to make comparisons between data obtained for conditions A and B. (a side by side option would be great - I've looked at some examples in the forum but unfortunately they were not what I need)
So far I only managed to overlay them and create a mess of overlayed boxes unfortunately.
Anyone knows how to help please?
Thanks very much.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Box Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!