| ggblend-package | R Documentation |
ggblend is an R package that adds support for R 4.2 blend modes
(e.g. "multiply", "overlay", etc) to ggplot2.
The primary support for blending is provided by the blend() function,
which can be used to augment ggplot2::ggplot() layers/geoms or lists of
layers/geoms in a ggplot2::ggplot() specification.
For example, one can replace something like this:
df |> ggplot(aes(x, y)) + geom_X(...) + geom_Y(...) + geom_Z(...)
With something like this:
df |>
ggplot(aes(x, y)) +
geom_X(...) +
geom_Y(...) |> blend("multiply") +
geom_Z(...)
In order to apply a "multiply" blend to the layer with geom_Y(...).
The following global options can be set using options() to modify the
behavior of ggblend:
"ggblend.check_blend": If TRUE (default), blend() will warn if
you attempt to use a blend mode not supported by the current graphics
device, as reported by dev.capabilities()$compositing. Since this check
can be unreliable on some devices (they will report not support a blend
mode that they do support), you can disable this warning by setting this
option to FALSE.
"ggblend.check_affine_transform": If TRUE (default), affine_transform() will warn if
you attempt to use a blend mode not supported by the current graphics
device, as reported by dev.capabilities()$transformation. Since this check
can be unreliable on some devices (they will report not support a blend
mode that they do support), you can disable this warning by setting this
option to FALSE.
Maintainer: Matthew Kay mjskay@northwestern.edu (ORCID) [copyright holder]
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.