Extract necessary information from the ggplot mappings.

mapping_spc(mapping_plt)

Arguments

mapping_plt

A list of defined aesthetics from the ggplot object.

Value

list of encodings with their field descriptions

Examples

library(ggplot2) p <- ggplot(data = iris, aes(x = Petal.Width, y = Petal.Length)) p <- p + geom_point() mapping_spc(p$mapping)
#> $x #> $x$field #> [1] "Petal.Width" #> #> #> $y #> $y$field #> [1] "Petal.Length" #> #>