I would like to include tick marks in addition to xlab
in a 3 by 3 panel of bar plots. I tried this solution for a single graph, but somehow I had trouble replicating it. The idea is to label each of the bars with d that runs from -3 to +3, with a unit increase. The first bar in each plot represents the value of -3. I tried to demonstrate my problem with a simulated data below. Any ideas?
# 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])
}