对在R中的HH封装图中旋转轴标签有任何建议吗?
在下面的例子中,我希望标签A、B和C处于45度的角度。“‘rot”只旋转滴答,而文本(object,srt=45)似乎不起作用。
library(HH)
test<-data.frame('A'=c(10,12,40,12),
'B'=c(14,23,13,30),
'C'=c(11,40,12,16))
rownames(test)<-c("No","Maybe","Plausible","Yes")
likert(t(test)[,1:4], horizontal = FALSE,as.percent = TRUE,
main = NULL,
xlab = "Percent", # becomes ylab due to horizontal arg
ylab = "Condition", #xlab.top = "Total in Condition",
ylab.right = FALSE #removes Row Count Totals from Right)发布于 2018-09-06 08:00:16
以下是一种方法:
likert(t(test)[,1:4], horizontal = FALSE,as.percent = TRUE,
main = NULL,
xlab = "Percent", # becomes ylab due to horizontal arg
ylab = "Condition", #xlab.top = "Total in Condition",
ylab.right = FALSE,
scales = list(x = list(rot = c(45, 0))))

这和其他格图是一样的。提供了一种用于上下标号旋转的双元素矢量。
https://stackoverflow.com/questions/52196125
复制相似问题