# First turn off axes on your plot:
plot(1:5, 1:5, axes=FALSE)
# now tell it that annotations will be rotated by 90* (see ?par)
par(las=2)
# now draw the first axis
axis(1, at=1:5, labels=c("yo ho ho and a bottle of rum", 2:5))
# add the other default embellishments, if you like
axis(2) #default way
box()
par(mar=c(6,1,1,1))
这样的东西。然后,par(las=foo)
的方式只能将其旋转90度。我相信135度是可能的,但不确定具体方法。(也许使用ggplot2比基本图形更容易。)如果您想要将长标签分成2或3行,则可以在字符串中间添加\n
,例如:"yo ho ho\nand a bottle of \nrum"
。axis()
函数还没有应用srt
参数。我觉得这可能是人们最常去寻找它的地方。 - Badger
axis
,(?axis
)。 - user3710546