Learn R Programming

inlabru (version 2.1.9)

gg.SpatialPixels: Geom for SpatialPixels objects

Description

Uses geom_point to plot the pixel centers.

Usage

# S3 method for SpatialPixels
gg(data, ...)

Arguments

data

A SpatialPixels object.

...

Arguments passed on to geom_tile.

Value

A geom_tile return value.

See Also

Other geomes for spatial data: gg.SpatialGridDataFrame, gg.SpatialLines, gg.SpatialPixelsDataFrame, gg.SpatialPoints, gg.SpatialPolygons, gg, gm

Examples

Run this code
# NOT RUN {
# Load Gorilla data

data(gorillas)

# Turn elevation covariate into SpatialPixels
pxl = SpatialPixels(SpatialPoints(gorillas$gcov$elevation))

# Plot the pixel centers
ggplot() + gg(pxl, size = 0.1)
# }

Run the code above in your browser using DataLab