Extract necessary scales information from a single scales list. Is called by scales_spc().`

get_scales(scale)

Arguments

scale

A single ggplot2 scale object.

Value

A list of scale specifications for scales that differ from the default scales.

Examples

library(ggplot2) p <- ggplot(data = iris) p <- p + geom_point(aes(x = Petal.Width, y = Petal.Length)) p <- p + scale_y_log10() get_scales(p$scales$scales[[1]])
#> $name #> NULL #> #> $class #> [1] "ScaleContinuousPosition" #> #> $aesthetics #> [1] "y" #> #> $transform #> $transform$name #> [1] "log-10" #> #>