在 matlab 中为箱线图旋转多线 xlabels

Rotate multi line xlabels for boxplot in matlab

我想用旋转的 xlabels 制作箱线图。对于一个简单的案例,这是可行的:

SCAgroups = [1, 1, 2];
SCAgroups2 = {'a', 'b', 'a'};
fH = figure();
aH = axes(fH);
boxplot(aH, CVval, SCAgroups);
xtickangle(aH, 90);

现在我有 2 个标签来对数据进行分组:

SCAgroups = [1, 1, 2];
SCAgroups2 = {'a', 'b', 'a'};
fH = figure();
aH = axes(fH);
boxplot(aH, CVval, {SCAgroups, SCAgroups2});
xtickangle(aH, 90);

当标签是多行时,如何旋转 Xlabels?

有一个箱线图参数'LabelOrientation'

SCAgroups = [1, 1, 2];
SCAgroups2 = {'a', 'b', 'a'};
fH = figure();
aH = axes(fH);
boxplot(aH, rand(2,3), {SCAgroups, SCAgroups2},'LabelOrientation','inline');