I have to plot grid in my plots. I have found one solution for this purpose
barplot(1:50)
grid()
box()
par(new = TRUE)
barplot(1:50)
And following is the plot
I am ok with it. But why I should call barplot twice. Is there some easy way to move grid to background ?
I have faced following problem is my plot (boxplot)
png("test2.png")
bm = boxplot(exuper, fuper, super, tuper, dat$uper, outline = F, names=names, panel.first = grid())
box()
dev.off()
AND THE ERROR is
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
> box()
Error in box() : plot.new has not been called yet