Don't want box plots to overlap...
Ältere Kommentare anzeigen
Hi,
I'm trying to get two boxplots to plot next to each other and NOT overlap (as is the case with the below code). I would also like there to be a label at the bottom of each boxplot indicating if it's the median or the mean boxplot. How would I go about this?
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Boxplot of mean/median start of exposure for ALL study participant
figure
box_mean=boxplot(MC_participant_Mean);
hold on
box_med=boxplot(MC_participant_Med);
ylabel('Start of PFHxS exposure after 1970 (6mo)')
title('Distribution of exposure for all study participant (MC=10,000)')
Many thanks!!
3 Kommentare
Mario Malic
am 7 Jun. 2021
I haven't used this function, try
figure
box_mean=boxplot([MC_participant_Mean, MC_participant_Med]);
Wesser
am 7 Jun. 2021
Mario Malic
am 8 Jun. 2021
subplot(1,2,1)
boxplot(MC_participant_Mean)
subplot(1,2,2)
boxplot(MC_participant_Med)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Box Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
