% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot.R
\name{gg.SpatRaster}
\alias{gg.SpatRaster}
\title{Geom wrapper for SpatRaster objects}
\usage{
\method{gg}{SpatRaster}(data, ...)
}
\arguments{
\item{data}{A SpatRaster object.}

\item{\dots}{Arguments passed on to \code{geom_spatraster}.}
}
\value{
The output from `geom_spatraster.
}
\description{
Convenience wrapper function for \code{tidyterra::geom_spatraster()}.
Requires the \code{ggplot2} and \code{tidyterra} packages.
}
\examples{
if (require("ggplot2", quietly = TRUE) &&
  bru_safe_terra(quietly = TRUE) &&
  require("tidyterra", quietly = TRUE)) {
  # Load Gorilla covariates

  gcov <- gorillas_sf_gcov()

  # Plot the pixel centers
  ggplot() +
    gg(gcov$elevation)
}
}
\seealso{
Other geomes: 
\code{\link{gg}()},
\code{\link{gg.RasterLayer}()},
\code{\link{gg.Spatial}},
\code{\link{gg.data.frame}()},
\code{\link{gg.fm_mesh_1d}()},
\code{\link{gg.fm_mesh_2d}()},
\code{\link{gg.matrix}()},
\code{\link{gg.sf}()}
}
\concept{geomes}
