boxplot and how to change x-axis
이전 댓글 표시
Hi,
I have a matrix (100,7) with data which I want to plot with boxplot. boxplot(matrix) does the job but I haven't figured out yet how I can change the x-axis. Now it draws a box for each column of the matrix. So, the labels go from 1 to 7. I want to replace 1 to 7 with elements provided by another vector (with 7 elements). How can I do that?
답변 (3개)
Oleg Komarov
2011년 3월 3일
X = randn(100,4);
boxplot(X,'Labels',{'one','two','three','four'})
Oleg
댓글 수: 2
Muhlbauer
2011년 3월 4일
Oleg Komarov
2011년 3월 4일
Can you show the code that gives you the error?
I don't get any error if I pass a numeric vector of labels, 7, 5 or whatever they are as long as they match the number of columns of my data
Walter Roberson
2011년 3월 3일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Box Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!