# Makie - arrowhead options

**URL:** https://discourse.julialang.org/t/makie-arrowhead-options/100596
**Category:** Visualization
**Tags:** plotting, makie, arrow
**Created:** [June 20, 2023, 9:38am UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596 "2023-06-20T09:38:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yoplo](https://avatars.discourse-cdn.com/v4/letter/y/5daacb/32.png) [@yoplo](https://discourse.julialang.org/u/yoplo)
#### Post date: [June 20, 2023, 9:38am UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596/1 "2023-06-20T09:38:05Z")

</div>

Hello!  
I am drawing an arrows plot in GLMakie,  
Where can I find a list of the legal inputs to the arrowhead keyword?

yoplo

---

<div class="post-metadata">

### Author: ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)
#### Post date: [June 20, 2023, 9:50am UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596/2 "2023-06-20T09:50:19Z")

</div>

Hi. Generally for the 2D case that can be any character:

```julia
julia> arrows(xs, ys, us, vs, arrowsize = 10, lengthscale = 0.3,
           arrowcolor = strength, linecolor = strength, arrowhead='H')

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/2/a25ded4ea305ce547e1e204fbf95b120023ee53e.png)

But, probably you are referring to a marker list as you can find here [Page Redirection](https://docs.makie.org/stable/examples/plotting_functions/scatter/index.html#default_markers)

```julia
# eg
julia> arrows(xs, ys, us, vs, arrowsize = 10, lengthscale = 0.3,
           arrowcolor = strength, linecolor = strength, arrowhead=:rect)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/f/6fec6fc085655d8ed1afc856f22eba3ec66d3d95.png)

### Disclaimer

Also `GLMakie` is just the backend used to print your visualization. The core functionality you are asking about is defined generally for `Makie.jl` and holds for all backends (e.g.`CairoMakie`, WGLMakie`, …)

---

<div class="post-metadata">

### Author: ![yoplo](https://avatars.discourse-cdn.com/v4/letter/y/5daacb/32.png) [@yoplo](https://discourse.julialang.org/u/yoplo)
#### Post date: [June 20, 2023, 11:42am UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596/3 "2023-06-20T11:42:11Z")

</div>

Thank you for the quick reply!  
I thought arrow heads would have their own markers…  
How then would I make a standard arrow like this: ----\>  
?

---

<div class="post-metadata">

### Author: ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)
#### Post date: [June 20, 2023, 1:50pm UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596/4 "2023-06-20T13:50:29Z")

</div>

Not setting the `arrowhead` will draw a standard arrow like the example here [arrows · Makie](https://docs.makie.org/stable/examples/plotting_functions/arrows/#examples)  
Or using `arrowhead='↑'` like [here](https://docs.makie.org/stable/examples/plotting_functions/scatter/index.html#marker_rotation)

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [June 20, 2023, 5:14pm UTC](https://discourse.julialang.org/t/makie-arrowhead-options/100596/5 "2023-06-20T17:14:19Z")

</div>

You can use whatever you want, arrowheads are reasonably easy to make yourself if you want a specific one:

```julia
julia> begin
       f = Figure(resolution = (800, 800))
       Axis(f[1, 1], backgroundcolor = "black")

       xs = LinRange(0, 2pi, 20)
       ys = LinRange(0, 3pi, 20)
       us = [sin(x) * cos(y) for x in xs, y in ys]
       vs = [-cos(x) * sin(y) for x in xs, y in ys]
       strength = vec(sqrt.(us .^ 2 .+ vs .^ 2))

       arrowpoly = Makie.Polygon(Point2f[(0, 1), (0.5, -0.3), (0, 0), (-0.5, -0.3)])

       arrows!(xs, ys, us, vs, arrowsize = 10, lengthscale = 0.3,
           arrowcolor = strength, linecolor = strength, arrowhead = arrowpoly)

       f
       end

```

 ![Screenshot 2023-06-20 at 19.13.45](https://global.discourse-cdn.com/julialang/original/3X/a/b/abb3836ef244ad7d0ecb3a6748312c3739b8a152.png)
