필터 지우기
필터 지우기

Multiple boxplots for a single plot

조회 수: 3 (최근 30일)
Hillaryfor2016
Hillaryfor2016 2015년 2월 9일
댓글: 檮杌 2016년 12월 6일
I have 8 matrices of nX5 dimensions that I wish to plot as boxplots on the same figure. Ideally the figure will show 8 boxplots for each of the 5 columns (i.e. 40 individual box plots). Ive struggled with trying to get the hold on functionality to work, likewise using a positional variable for each plot. Likewise Im not sure how to 'group' the individual columns from the different matrices.
PS Have attached the variable 'xvar.m' which I wish to boxplot.

채택된 답변

Kelly Kearney
Kelly Kearney 2015년 2월 9일
I wrote boxplot2 to handle data like this; it plots boxplots similar to grouped bar plots:
% Some data, 8 x 1 cell array with 100 x 5 arrays
x = cell(8,1);
for ix = 1:8
x{ix} = randn(100,5);
end
% Plot
boxplot2(permute(cat(3, x{:}), [2 3 1]), 1:5)
  댓글 수: 7
Hillaryfor2016
Hillaryfor2016 2015년 2월 10일
Many Many thanks!!!!
檮杌
檮杌 2016년 12월 6일
I love your work ! Thanks a lot!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Haifeng Lu
Haifeng Lu 2016년 3월 19일
Thanks a lot! It really helps me!

제품

Community Treasure Hunt

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

Start Hunting!

Translated by