# arrows

AbstractPlotting.arrowsFunction
arrows(points, directions; kwargs...)
arrows(x, y, u, v)
arrows(x::AbstractVector, y::AbstractVector, u::AbstractMatrix, v::AbstractMatrix)
arrows(x, y, z, u, v, w)

Plots arrows at the specified points with the specified components. u and v are interpreted as vector components (u being the x and v being the y), and the vectors are plotted with the tails at x, y.

If x, y, u, v are <: AbstractVector, then each 'row' is plotted as a single vector.

If u, v are <: AbstractMatrix, then x and y are interpreted as specifications for a grid, and u, v are plotted as arrows along the grid.

arrows can also work in three dimensions.

Attributes

Available attributes and their defaults for Arrows{T} where T are:

  arrowcolor   :black
arrowsize    0.3
arrowtail    "nothing"
colormap     :viridis
lengthscale  1.0f0
linecolor    :black
linestyle    "nothing"
linewidth    1
normalize    false
scale        Float32[1.0, 1.0, 1.0]
source

### Examples

using GLMakie

f = Figure(resolution = (800, 600))
Axis(f[1, 1])

xs = LinRange(1, 10, 20)
ys = LinRange(1, 15, 20)
us = [cos(x) for x in xs, y in ys]
vs = [sin(y) for x in xs, y in ys]

arrows!(xs, ys, us, vs, arrowsize = 0.2, lengthscale = 0.3)

f