plot.grid: Coordinates and Grids

View source: R/plot.grid.R

plot.gridR Documentation

Coordinates and Grids

Description

Functions to assign a grid label(s) given coordinates, and vice versa.

Usage

## S3 method for class 'grid'
plot(x, label, col = "white", border = "black", ...)

Arguments

label

Logical value or character strings specifying whether or what to display as labels when plotting grids.

col

Background colour when plotting a grid using plot.grid.

border

Border line colour when plotting a grid using plot.grid.

vertices

Logical value specifiying whether to output the corner coordinates of each grid.

See Also

deg2grid

Examples

# Generate set of snow crab 10'x10' grids:
x <- expand.grid(seq(-66.5 + 1/12, -60 - 1/12, by  = 1/6),
                 seq(45.5-1/12, 49 + 1/12, by  = 1/6))
x$grid <- deg2grid(x[,1], x[,2])
x <- grid2deg(x$grid, vertices = TRUE) # Grid corner coordinates.
plot(c(-66.5, -60), c(45, 49), type = "n")
coast()
plot.grid(x$grid)


TobieSurette/gulf.spatial documentation built on Sept. 26, 2024, 7:41 p.m.