How can I display x boxplots of x separate vectors of data side by side in the same figure ?
이전 댓글 표시
I have four different vectors in my data. I want to create four different boxplots for each one of them and display them all in the same figure,side by side so I can compare them. Is that possible ? Subplot is not actually what would fit in this case and I have also tried 'hold on' but that doesn't work either (at least the way I do it). I am quite new in Matlab so could you please help me figure this out ? Thanks
first_plot=100*scores./counts; second_plot=100*Fscores./Fcounts; third_plot=100*Gscores./Gcounts; fourth_plot=100*Pscores./Pcounts;
댓글 수: 2
David Sanchez
2013년 7월 18일
could you please describe better what you want? I don't get why subplot does not work for you. with
subplot(2,2,k) for k= 1,2,3,4
you would get your 4 plots ( in a 2 x 2 disposition ) and be able to compare your data.
Panagiota
2013년 7월 18일
답변 (1개)
Wayne King
2013년 7월 18일
Put the data in a matrix with each vector a column vector and call boxplot() on the matrix.
X = randn(100,4);
boxplot(X)
Does this not work for you? If not, can you please detail why?
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!