Plotting Multiple Box Plots in Same Graph

2 Ansichten (letzte 30 Tage)
A M
A M am 24 Mai 2017
Kommentiert: A M am 24 Mai 2017
I intend to plot multiple Box Plots in the same Graph. How to do that? If i use 'hold on', it jumbles all of them over one another.
boxplot(satisfaction_1,'notch', 'on');
hold on;
boxplot(satisfaction_2,'notch', 'on');
hold on;
boxplot(satisfaction_3,'notch', 'on');
hold on;
boxplot(satisfaction_4,'notch', 'on');
hold on;

Antworten (1)

KL
KL am 24 Mai 2017
Bearbeitet: KL am 24 Mai 2017
boxplot([satisfaction_1 satisfaction_2 satisfaction_3 satisfaction_4]...
,'Notch', 'on','Labels',{'S1','S2','S3','S4'}); %edited
  5 Kommentare
KL
KL am 24 Mai 2017
I'm not entirely sure what you mean but sounds like a subplot to me.
figure
subplot(1,3,1)
boxplot(x1)
subplot(1,3,2)
boxplot(x2)
subplot(1,3,3)
boxplot(x3)
A M
A M am 24 Mai 2017
@KL ... subplot would make windows in the same graph. While i want to place all sub box plots in the same graph

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by