Geom for SpatialGridDataFrame objects
Coerces input SpatialGridDataFrame to SpatialPixelsDataFrame and calls gg.SpatialPixelDataFrame to plot it.
## S3 method for class 'SpatialGridDataFrame' gg(data, ...)
data |
A SpatialGridDataFrame object. |
... |
Arguments passed on to gg.SpatialPixelsDataFrame(). |
A geom_tile value.
Other geomes for spatial data:
gg.SpatialLines()
,
gg.SpatialPixelsDataFrame()
,
gg.SpatialPixels()
,
gg.SpatialPoints()
,
gg.SpatialPolygons()
,
gg()
,
gm()
# Load Gorilla data data("gorillas", package = "inlabru") # Plot Gorilla elevation covariate provided as SpatialPixelsDataFrame. # The same syntax applies to SpatialGridDataFrame objects. ggplot() + gg(gorillas$gcov$elevation) # Add Gorilla survey boundary and nest sightings ggplot() + gg(gorillas$gcov$elevation) + gg(gorillas$boundary) + gg(gorillas$nests) # Load pantropical dolphin data data("mexdolphin") # Plot the pantropiical survey boundary, ship transects and dolphin sightings ggplot() + gg(mexdolphin$ppoly) + # survey boundary as SpatialPolygon gg(mexdolphin$samplers) + # ship transects as SpatialLines gg(mexdolphin$points) # dolphin sightings as SpatialPoints # Change color ggplot() + gg(mexdolphin$ppoly, color = "green") + # survey boundary as SpatialPolygon gg(mexdolphin$samplers, color = "red") + # ship transects as SpatialLines gg(mexdolphin$points, color = "blue") # dolphin sightings as SpatialPoints # Visualize data annotations: line width by segment number names(mexdolphin$samplers) # 'seg' holds the segment number ggplot() + gg(mexdolphin$samplers, aes(color = seg)) # Visualize data annotations: point size by dolphin group size names(mexdolphin$points) # 'size' holds the group size ggplot() + gg(mexdolphin$points, aes(size = size))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.