% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2-utils.R
\name{map_axis_labels}
\alias{map_axis_labels}
\title{Color axis labels}
\usage{
map_axis_labels(
  plt,
  label_data_x = NULL,
  label_data_y = NULL,
  aes_label,
  scale = ggplot2::scale_color_hue(aesthetics = "axis_color")
)
}
\arguments{
\item{plt}{\code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} object}

\item{label_data_x}{\code{\link[=data.frame]{data.frame()}} containing the mapping between x-axis labels and
\code{aes_label}}

\item{label_data_y}{\code{\link[=data.frame]{data.frame()}} containing the mapping between y-axis labels and
\code{aes_label}}

\item{aes_label}{character or bare symbol giving the column in \code{label_data} to be mapped}

\item{scale}{\code{ggplot2} discrete color}
}
\value{
\code{plt} with axis text modified
}
\description{
Color axis labels
}
\examples{
require(ggplot2)
require(dplyr)
plt = ggplot(mpg, aes(x = manufacturer, y = drv)) + geom_jitter()
label_data = mpg \%>\% select(manufacturer) \%>\% unique() \%>\%
mutate(euro = manufacturer \%in\% c('audi', 'volkswagen'))
map_axis_labels(plt, label_data_x = label_data, aes_label = euro)
}
