% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotate-brain.R
\name{annotate_brain}
\alias{annotate_brain}
\title{Add view labels to brain atlas plots}
\usage{
annotate_brain(
  atlas,
  position = position_brain(),
  hemi = NULL,
  view = NULL,
  size = 3,
  colour = "grey30",
  family = "mono",
  padding = 0.05,
  nudge_y = 0,
  ...
)
}
\arguments{
\item{atlas}{A `brain_atlas` object (e.g. `dk()`, `aseg()`).}

\item{position}{The same layout you passed to [geom_brain()], from
[position_brain()].}

\item{hemi}{Character vector of hemispheres to include. If `NULL`
(default), all hemispheres are included.}

\item{view}{Character vector of views to include. If `NULL`
(default), all views are included.}

\item{size}{Text size in mm (default: `3`).}

\item{colour}{Text colour (default: `"grey30"`).}

\item{family}{Font family (default: `"mono"`).}

\item{padding}{Vertical gap between each label and its view, as a
fraction of the plot's total height (default: `0.05`). Labels are also
bottom-anchored (`vjust = 0`) so they sit clear of the geometry.}

\item{nudge_y}{Additional absolute vertical offset for labels
(default: `0`).}

\item{...}{Additional arguments passed to [ggplot2::annotate()].}
}
\value{
A ggplot2 annotation layer.
}
\description{
Annotates each brain view with a text label positioned above the
view's bounding box. For cortical atlases, labels show hemisphere
and view (e.g., "left lateral"). For subcortical and tract atlases,
labels show the view name directly (e.g., "axial_1", "sagittal").
}
\details{
Pass the same `position` you gave [geom_brain()] and the labels line up with
the views automatically.
}
\examples{
library(ggplot2)

pos <- position_brain(hemi ~ view)
ggplot() +
  geom_brain(atlas = dk(), position = pos, show.legend = FALSE) +
  annotate_brain(atlas = dk(), position = pos)

ggplot() +
  geom_brain(atlas = dk(), show.legend = FALSE) +
  annotate_brain(atlas = dk())
}
