- boxplot doesn't support variably-spaced box locations.
- use 'LabelOrientation','Horizontal' to maintain normal tick label orientation.
Change the distance between boxplots
19 次查看(过去 30 天)
显示 更早的评论
I use following code to create the boxplot. I want to change the distance between the two boxes. However, I cant find any property to control the distance.
rng default % For reproducibility
x = randn(100,15);
figure
boxplot(x,'PlotStyle','compact')
set(gca,'FontSize',10,'XTickLabelRotation',90)
Also, the XTickLabelRotation does not change the xtick label orientaiton. How can I change orientaion?

0 个评论
采纳的回答
dpb
2021-11-13
编辑:dpb
2021-11-13
On the latter, why TMW chose to create a different name for the property instead of maintaining consistency with all other plotting routines is one of those maddening inconsistencies they love to introduce -- more and more so recently, it seems.
I suppose it goes to the specialized plot that's to be easy to use and so doesn't need/shouldn't have all the bells and whistles of a generic axes object. So, they provide the two choices of rotated or not with a different name. I suppose there is some logic there...
4 个评论
dpb
2021-11-14
The position vector is a 4-vector of [left bottom width height]. Adjust as desired. See the doc on axes properties for all the details.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!