Grid in an R plot

后端 未结 4 1173
借酒劲吻你
借酒劲吻你 2020-12-08 06:47

Is there a command to easily add a grid onto an R plot?

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 07:15

    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.

提交回复
热议问题