Plotting multiple boxplots within the same plot/figure
显示 更早的评论
I have six variables that I would like to plot within the same figure/plot as individual box-plots. I have tried doing so by plotting one, then using 'hold on' before the plotting the next, but this hasn't worked. How might I go about doing this?
Thank you.
2 个评论
Walter Roberson
2012-11-30
subplot() ?
采纳的回答
更多回答(1 个)
Emma
2012-12-1
0 个投票
1 个评论
Walter Roberson
2012-12-1
shortcut:
NMat = nan(6, 10000);
And since you are copying the same number of columns for each you can eliminate the other lines:
boxplot( [mat1(:), mat2(:), mat3(:), mat4(:), mat5(:), mat6(:)], 'notch', 'on', 'color', 'rb')
类别
在 帮助中心 和 File Exchange 中查找有关 Box Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!