2 boxplots overlayed - how to
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Box Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!