MATLAB: Plotting multiple boxplots within the same plot/figure

boxplots

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.

Best Answer

subplot(3,1,1)
boxplot(mat1, 'notch', 'on', 'colors', 'r')
subplot(3,1,2)
boxplot(mat2, 'notch', 'on', 'colors', 'b')
subplot(3,1,3)
boxplot(mat3, 'notch', 'on', 'colors', 'c')