% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DimPlot.R
\name{theme_umap_arrows}
\alias{theme_umap_arrows}
\title{Add Simplified Axis Indicators to ggplot}
\usage{
theme_umap_arrows(
  anchor_x = unit(6, "mm"),
  anchor_y = unit(6, "mm"),
  line_length = unit(12, "mm"),
  arrow_length = unit(2.5, "mm"),
  text_offset_x = unit(2.5, "mm"),
  text_offset_y = unit(2.5, "mm"),
  text_size = 10,
  line_width = 1,
  x_label = NULL,
  y_label = NULL
)
}
\arguments{
\item{anchor_x}{X-coordinate for the anchor point of the arrows, Default: unit(6, "mm")}

\item{anchor_y}{Y-coordinate for the anchor point of the arrows, Default: unit(6, "mm")}

\item{line_length}{Length of the arrow lines, Default: unit(12, "mm")}

\item{arrow_length}{Length of the arrow heads, Default: unit(2.5, "mm")}

\item{text_offset_x}{X-offset for the axis labels, Default: unit(2.5, "mm")}

\item{text_offset_y}{Y-offset for the axis labels, Default: unit(2.5, "mm")}

\item{text_size}{Font size for the axis labels, Default: 10}

\item{line_width}{Width of the arrow lines, Default: 1}

\item{x_label}{Custom label for the x-axis, Default: NULL (auto-detected)}

\item{y_label}{Custom label for the y-axis, Default: NULL (auto-detected)}
}
\value{
A ggplot theme object that can be added to an existing ggplot
}
\description{
Adds simplified axis indicators (arrows and labels) to a ggplot object, typically used for dimension reduction plots like UMAP or t-SNE.
}
\details{
This function creates a theme that adds simplified axis indicators to the bottom-left corner of a ggplot.
It consists of two perpendicular arrows representing the x and y axes, along with their respective labels.
This approach is particularly useful for dimension reduction plots like UMAP or t-SNE where traditional axes are often removed to reduce visual clutter.
The function attempts to auto-detect axis labels, but custom labels can be provided.
}
\examples{
library(Seurat)
library(SeuratExtend)

features <- c("cluster", "orig.ident", "CD3D", "CD14")

# Add arrows to the overall plot
DimPlot2(pbmc, features = features, theme = NoAxes()) +
  theme_umap_arrows()

# Add arrows to each subplot
DimPlot2(pbmc, features = features, theme = theme_umap_arrows())
}
