% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UserFacingCoreFunctions.R
\name{yaxis_title_plus}
\alias{yaxis_title_plus}
\title{Relocate a Y Axis Title to Above the Y Axis on a Ggplot and Turn it Horizontal.}
\usage{
yaxis_title_plus(
  location = "top",
  nudgeTopLegendDown = FALSE,
  nudgeHowMuch = 20,
  override_legend_alphasize = TRUE,
  enable_coaching = TRUE
)
}
\arguments{
\item{location}{A length-1 character string matching either "top" or "bottom" for the placement of the new y axis title. Defaults to \code{"top"}. \code{"bottom"} should generally only be used when the x axis labels have been moved to the top of the graph (uncommon).}

\item{nudgeTopLegendDown}{A length-1 logical indicating whether a top legend (box) (if any) should be moved down to align with the relocated y axis title (where they could clip into each other). Defaults to FALSE.}

\item{nudgeHowMuch}{A length-1 positive integer indicating how much to nudge the top legend (box) (if any) down, if \code{nudgeTopLegendDown} == \code{TRUE}. Defaults to \code{20} points as a general guess and may need adjusting.}

\item{override_legend_alphasize}{Logical indicating whether, for any fill, color, and/or shape legends, to override the size and/or alpha values to the ggplotplus default values (1 and 5, respectively). Defaults to TRUE.}

\item{enable_coaching}{Logical indicating whether ggplotplus should perform certain automated checks for possible non-Universal graph design and provide coaching messages when these are detected. Defaults to TRUE.}
}
\value{
An ggplot class object for adding to a plot with \code{+}.
}
\description{
This function relocates the y axis title of a ggplot to the top, above the y axis line and left-justified to the left edge of the y axis labels, sort of like a plot subtitle. It also orients the text horizontally for space-efficiency and easy reading. This is otherwise difficult to do using \code{ggplot2}'s default styling tools.
}
\examples{
#WE DO NOT RECOMMEND USING yaxis_title_plus() WITHOUT theme_plus()
ggplot2::ggplot(iris, ggplot2::aes(x=Sepal.Length, y=Petal.Length)) +
ggplot2::geom_point() +
theme_plus() +
yaxis_title_plus()
}
