theme_umap_arrows.Rd
Adds simplified axis indicators (arrows and labels) to a ggplot object, typically used for dimension reduction plots like UMAP or t-SNE.
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
)
X-coordinate for the anchor point of the arrows, Default: unit(6, "mm")
Y-coordinate for the anchor point of the arrows, Default: unit(6, "mm")
Length of the arrow lines, Default: unit(12, "mm")
Length of the arrow heads, Default: unit(2.5, "mm")
X-offset for the axis labels, Default: unit(2.5, "mm")
Y-offset for the axis labels, Default: unit(2.5, "mm")
Font size for the axis labels, Default: 10
Width of the arrow lines, Default: 1
Custom label for the x-axis, Default: NULL (auto-detected)
Custom label for the y-axis, Default: NULL (auto-detected)
A ggplot theme object that can be added to an existing ggplot
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.