% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-base.R
\name{geom_spoke}
\alias{geom_spoke}
\title{Spokes (vector field)}
\usage{
geom_spoke(
  mapping = NULL,
  data = NULL,
  color = NULL,
  linewidth = NULL,
  alpha = NULL
)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Requires \code{x}, \code{y}, and the
\code{angle} (radians) and \code{radius} columns supplied via \code{xend}/\code{yend}.}

\item{color, linewidth, alpha}{Appearance.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
A segment from each point at a given angle and radius — the usual way to
draw a vector or wind field.
}
\examples{
g <- expand.grid(x = 1:5, y = 1:5)
g$angle <- atan2(g$y - 3, g$x - 3)
g$radius <- 0.4
ggnext(g, aes(x, y, xend = angle, yend = radius)) + geom_spoke()
}
