get_labs {colorrepel}R Documentation

Extract custom labels from ggplot object

Description

Extract custom labels from ggplot object

Usage

get_labs(g)

Arguments

g

ggplot object

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.1.0 Index]