layer_list {ggblend} | R Documentation |
Lists of layer-like objects
Description
A list of layer-like objects, which can be used in layer operations
(through function application or multiplication) or added to a ggplot2()
object.
Usage
layer_list(...)
as_layer_list(x)
## S3 method for class 'layer_list'
as_layer_list(x)
## S3 method for class 'list'
as_layer_list(x)
## S3 method for class 'LayerInstance'
as_layer_list(x)
## S4 method for signature 'layer_list,layer_list'
e1 + e2
## S4 method for signature 'layer_list'
show(object)
Arguments
x , ... |
layer-like objects |
object , e1 , e2 |
Details
For the most part, users of ggblend need not worry about this class.
It is used internally to simplify multiple dispatch on binary operators, as
the alternative (list()
s of ggplot2::layer()
s) is more cumbersome.
ggblend converts input lists to this format as needed.
Value
An object of class "layer_list"
.
Examples
library(ggplot2)
# layer_list()s act just like list()s of layer()s in that they can
# be added to ggplot() objects
data.frame(x = 1:10) |>
ggplot(aes(x, x)) +
layer_list(
geom_line(),
geom_point()
)
[Package ggblend version 0.1.0 Index]