If you are not using a custom tick interval, you can control the grid and axes parameters directly from the plot()
command:
plot(cumsum(rnorm(100)), type='l', panel.first=grid())
The plot.default()
documentation provides more information about these parameters.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…