我想在3x3条形图中除了xlab
之外还包括刻度线。我尝试了这个解决方案,对于单个图表它可以工作,但是我无法成功复制它。思路是用从-3到+3的单位增量标记每个条形图上的d。每个图中的第一个条表示值为-3。我尝试使用下面模拟数据演示我的问题。有什么建议吗?
# Data generation
# Populating a matrix
matrix(rnorm(63, 1:9), nrow=7, byrow=TRUE)
# Labelling the matrix
colnames(mat.s) <- c("Hs", "Sex", "Es", "Bo", "R", "W", "S", "Pri", "Abo")
# Tick mark indicator
d <- seq(-3,3,1)
# Plotting estimates
par(mfrow=c(3,3), mar = c(4,3,3,1))
for(i in 1:9) {
# Bar plot
barplot(mat.s[,i],
# X-label
xlab = colnames(mat.s)[i])
}
matrix(rnorm(63, 1:9), nrow=7, byrow=TRUE)
。 - eipi10