multiple boxplots in one figure
조회 수: 3 (최근 30일)
이전 댓글 표시
hi. i want to make box plots of three matrices (a, b and c) vs , each of order 1x31. but i want all boxplots in the same figure. anyone? thanks.
댓글 수: 0
답변 (1개)
Star Strider
2018년 5월 17일
Try this:
a = randn(1,31);
b = randn(1,31)*2 + 2;
c = randn(1,31)/2 + 3;
figure(1)
boxplot([a(:) b(:) c(:)])
set(gca, 'XTickLabel', {'a','b','c'}) % Optional
It forces them to become column vectors, horizontally concatenates them, and plots them.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!