Sha*_*ane 170
不确定这是不是你的意思,但尝试设置las=1
.这是一个例子:
require(grDevices)
tN <- table(Ni <- stats::rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20), las=1)
Run Code Online (Sandbox Code Playgroud)
这代表了轴标签的风格.(0 =平行,1 =全部水平,2 =全部垂直于轴,3 =全部垂直)
rcs*_*rcs 84
使用par(las=1)
.
见?par
:
las
numeric in {0,1,2,3}; the style of axis labels.
0: always parallel to the axis [default],
1: always horizontal,
2: always perpendicular to the axis,
3: always vertical.
Run Code Online (Sandbox Code Playgroud)
fed*_*orn 19
正如MaciejJończyk所提到的,您可能还需要增加利润
par(las=2)
par(mar=c(8,8,1,1)) # adjust as needed
plot(...)
Run Code Online (Sandbox Code Playgroud)
MCH*_*MCH 11
您需要使用theme()函数,如下所示将x轴标签旋转60度:
ggplot(...)+...+ theme(axis.text.x = element_text(angle=90, hjust=1))
Run Code Online (Sandbox Code Playgroud)