- mapping
Set of aesthetic mappings created by aes()
. If specified and
inherit.aes = TRUE
(the default), it is combined with the default mapping
at the top level of the plot. You must supply mapping
if there is no plot
mapping.
- data
The data to be displayed in this layer. In addition to the three
options described in ggplot2::geom_raster, there are two additional
methods:
If a SpatRaster
object (see terra::rast), this function will coerce
the raster to a data frame and assume the raster bands are in RGB order
(while allowing for, but ignoring, a fourth alpha band).
If a length-1 character vector, this function will attempt to load the object
via terra::rast.
- stat
The statistical transformation to use on the data for this
layer, either as a ggproto
Geom
subclass or as a string naming the
stat stripped of the stat_
prefix (e.g. "count"
rather than
"stat_count"
)
- position
Position adjustment, either as a string naming the adjustment
(e.g. "jitter"
to use position_jitter
), or the result of a call to a
position adjustment function. Use the latter if you need to change the
settings of the adjustment.
- ...
Other arguments passed on to layer()
. These are
often aesthetics, used to set an aesthetic to a fixed value, like
colour = "red"
or size = 3
. They may also be parameters
to the paired geom/stat.
- hjust, vjust
horizontal and vertical justification of the grob. Each
justification value should be a number between 0 and 1. Defaults to 0.5
for both, centering each pixel over its data location.
- interpolate
If TRUE
interpolate linearly, if FALSE
(the default) don't interpolate.
- na.rm
If FALSE
, the default, missing values are removed with
a warning. If TRUE
, missing values are silently removed.
- show.legend
logical. Should this layer be included in the legends?
NA
, the default, includes if any aesthetics are mapped.
FALSE
never includes, and TRUE
always includes.
It can also be a named logical vector to finely select the aesthetics to
display.
- inherit.aes
If FALSE
, overrides the default aesthetics,
rather than combining with them. This is most useful for helper functions
that define both data and aesthetics and shouldn't inherit behaviour from
the default plot specification, e.g. borders()
.
- scale
Integer. Maximum (possible) value in the three channels.
If NULL
, attempts to infer proper values from data -- if all RGB values
are <= 1 then 1, <= 255 then 255, and otherwise 65535.
- geom
The geometric object to use to display the data, either as a
ggproto
Geom
subclass or as a string naming the geom stripped of the
geom_
prefix (e.g. "point"
rather than "geom_point"
)