% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{annotate_quadrants}
\alias{annotate_quadrants}
\title{Annotate plot quadrants with percentages}
\usage{
annotate_quadrants(
  plot,
  x,
  y,
  cutoffs,
  line_color = "grey30",
  line_type = "solid",
  line_width = 0.5,
  label_size = 3,
  group = NULL
)
}
\arguments{
\item{plot}{A `ggplot` object.}

\item{x}{Name of the x variable in `plot$data`.}

\item{y}{Name of the y variable in `plot$data`.}

\item{cutoffs}{Cut points for x and y axes. Can be a numeric vector of length
1 or 2, or a list with the x and y cut points.}

\item{line_color}{Quadrant line color.}

\item{line_type}{Quadrant line type.}

\item{line_width}{Quadrant line width.}

\item{label_size}{Label size.}

\item{group}{Optional grouping column used to compute percentages within each
group.}
}
\value{
A `ggplot` object.
}
\description{
Annotate plot quadrants with percentages
}
\examples{
df <- data.frame(
  x = c(0.1, 0.2, 0.8, 0.9),
  y = c(0.1, 0.8, 0.2, 0.9)
)
p <- ggplot2::ggplot(df, ggplot2::aes(x = x, y = y)) +
  ggplot2::geom_point()
p

annotate_quadrants(p, x = "x", y = "y", cutoffs = 0.5)
}
