

   grid {base}                                  R Documentation

   AAdddd GGrriidd ttoo aa PPlloott

   DDeessccrriippttiioonn::

        `grid' adds an `nx' by `ny' rectangular grid to an
        existing plot, using lines of type `lty' and color
        `col'.

        If more fine tuning is required, use `abline(h = ., v =
        .)'  directly.

   UUssaaggee::

        grid(nx = NULL, ny = NULL, col = "lightgray", lty = "dotted")

   AArrgguummeennttss::

      nx,ny: number of cells of the grid in x and y direction.
             Defaults to the number of tick marks on the corre-
             sponding axis.

        col: character or (integer) numeric; color of the grid
             lines.

        lty: character or (integer) numeric; line type of the
             grid lines.

   SSeeee AAllssoo::

        `plot', `abline', `lines', `points'.

   EExxaammpplleess::

        data(iris)
        ## maybe change the desired number of tick marks:  par(lab=c(mx,my,7))
        plot(iris$Sepal.L, iris$Sepal.W, col = rep(1:3, rep(50, 3)),
             xlim = c(4, 8), ylim = c(2, 4.5), panel.first = grid())

