% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guide-legend-cross.R
\name{position_text}
\alias{position_text}
\title{Helper to position text}
\usage{
position_text(angle = NA, hjust = NA, vjust = NA, ..., element = element_text)
}
\arguments{
\item{angle}{A \verb{<numeric[1-4]>} value setting the angle of the text.}

\item{hjust, vjust}{A \verb{<numeric[1-4]>} between 0 and 1 to set the horizontal
justification (\code{hjust}) or vertical justification (\code{vjust}) for the text.}

\item{...}{Other arguments passed to the \code{element} function.}

\item{element}{An \verb{<function>} creating an object that inherits from the
\code{\link[ggplot2:element_text]{<element_text>}} class.}
}
\value{
A named list of \code{element} objects of length 4. The list has the
names \code{"top"}, \code{"right"}, \code{"bottom"} and \code{"left"}.
}
\description{
This is a helper function for use in \code{\link[=guide_legend_cross]{guide_legend_cross()}}. It creates
a list of text elements, each corresponding the top, right, bottom or left
positions. Input is given for that order as well.
}
\details{
Input other than the \code{element} argument will be recycled to length 4. \code{NA}
and 0-length input will be dropped.
}
\examples{
# Red text turning along with position
position_text(angle = c(0, -90, 180, 90), colour = "red")
}
