how to make the empty area of the boxplot smaller?
이전 댓글 표시
Here is the code I use:
boxplot(Tmean_split.pixels,'widths',0.1)

I want to make the empty area around the box smaller. There is huge empty area befor and after number 1 in x-axis and I want to make it smaller. How can I do that?
I used
xlim([0.9 1.1])
but it made the width of box larger which I dont want.
댓글 수: 2
KALYAN ACHARJYA
2019년 12월 25일
Can you provide the code to generate above mentioned plot?
Zeynab Mousavikhamene
2019년 12월 25일
답변 (1개)
Abhilash Padma
2019년 12월 30일
You could use the “PlotBoxAspectRatio” property of axes to decrease the size of x-axis so that you can make the empty area of the boxplot smaller. See the following code:
a=[3987,1269,1.032250000000000e+04,2784,6.331500000000000e+03,1515];
ax=axes;
boxplot(ax,a);
ax.PlotBoxAspectRatio=[0.3 1 1];
카테고리
도움말 센터 및 File Exchange에서 Exploration and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!