Skip to content
Prev 138381 / 398506 Next

Difficulty labeling plot axis when "mar" and "oma" are set

Dear all,

Though labeling the x and y axis in the plot command seems to be straight
forward, I can not get it to work if I do the following:


## Creating example data

edata <- c(1,2,1,2)

edata <- matrix(edata, 2, 2, byrow = T)

colnames(edata) <- c("a", "b")

edata <- data.frame(edata)



## plot data 


par(mfrow<- c(1,2))

plot(edata$a, edata$b, xlab = "a", ylab = "b")   ## Note that the x and y
axis are labled

plot(edata$a, edata$b, xlab = "a", ylab = "b")   


par(mfrow=c(1,2), mar = c(0,0,0,0), oma = c(3,3,3,3))

plot(edata$a, edata$b, xlab = "a", ylab = "b")   ## Note that the x and y
axis are not labled though x and ylab are set

plot(edata$a, edata$b, xlab = "a", ylab = "b", yaxt = "n")




Does anybody has an idea why this is

Thanks for the help