View source: R/stat_signHatch.R
stat_signHatch | R Documentation |
geom_signHatch
stat_signHatch(
mapping = NULL,
data = NULL,
geom = "sf",
position = "identity",
show.legend = NA,
inherit.aes = TRUE,
...,
density = 1,
angle = 45
)
geom_signHatch(
mapping = aes(),
data = NULL,
stat = "signHatch",
position = "identity",
show.legend = NA,
inherit.aes = TRUE,
...,
density = 1,
angle = 45
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
geom |
The geometric object to use to display the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
show.legend |
logical. Should this layer be included in the legends?
You can also set this to one of "polygon", "line", and "point" to override the default legend. |
inherit.aes |
If |
... |
Other arguments passed on to
|
density |
the density of shading lines, in lines per inch. The default value of NULL means that no shading lines are drawn. A zero value of density means no shading nor filling whereas negative values and NA suppress shading (and so allow color filling). |
angle |
the slope of shading lines, given as an angle in degrees (counter-clockwise). |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
geom_signHatch()
requires the following aesthetics:
x
:
y
:
mask
:
library(gg.layers)
library(ggplot2)
data("d_trendPerc")
d_mask <- mutate(d_trendPerc, mask = perc <= 0.99) #%>% as.data.frame()
ggplot() +
geom_raster(data = d_trendPerc, aes(x, y, fill = perc)) +
# geom_sf(data = shp) +
geom_signHatch(data = d_mask, aes(x, y, mask = mask), color = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.