get_labs {colorrepel} | R Documentation |
Extract custom labels from ggplot object
Description
Extract custom labels from ggplot object
Usage
get_labs(g, ggbuild = NULL)
Arguments
g |
ggplot object |
ggbuild |
already built ggplot_built object if available |
Value
named vector of labels
Examples
a <- ggplot2::ggplot(ggplot2::mpg, ggplot2::aes(displ, hwy)) +
ggplot2::geom_point(ggplot2::aes(color = as.factor(cyl))) +
ggplot2::geom_text(ggplot2::aes(label = model))
get_labs(a)
[Package colorrepel version 0.4.3 Index]