# Makie 3D arrows scale in a strange fashion

**URL:** <https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [October 27, 2022, 1:20pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371 "2022-10-27T13:20:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [October 27, 2022, 1:20pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/1 "2022-10-27T13:20:49Z")

</div>

I’m currently using a plot with a lot of `arrows` drawn into it. Sometimes I want to have both the length of the arrows and their size (cylinder / cone diameter in 3D) be proportional to a given value.  
The following plot superimposes two results only differing in their scaling of the `arrowsize` (diameter).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/b/9bd01a7c8cf3ad85fe3bee942d8c8dbc4ac567d1.png)

From this plot one can see that the conical arrow head is not taken into account for the _length_ of the arrow, but only the tail. Is this behavior intended, is it documented (did not find it), and is there a way to circumvent that behavior and have a constant overall length arrow with the current `Makie` options ?

@jules, a gentle bump, in case you have a suggestion.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [December 5, 2022, 12:43pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/2 "2022-12-05T12:43:04Z")

</div>

@ffreyer wrote most of the new arrow recipe 😉  
A github issue might also get more attention from the maintainers.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [December 5, 2022, 12:44pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/3 "2022-12-05T12:44:28Z")

</div>

Haha, I guess I did not want to add and issue given that you seem already pretty busy in case I just missed something simple !

---

<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:** [December 5, 2022, 1:17pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/4 "2022-12-05T13:17:56Z")

</div>

I guess this was not intentional. Maybe it should be changed, the only question is what to do in the edge case where the arrow head is longer than the distance between the points.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [December 5, 2022, 2:00pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/5 "2022-12-05T14:00:23Z")

</div>

Just to help reproduce, here is an example showing other surprising behavior (to me of course)

```julia
using GLMakie

fig = Figure()
ax = LScene(fig[1,1])
# Has to be added otherwise first arrows with single arrow fails
scatter!(ax,Point3f[(2,0,0),(0,2,0),(0,0,2)])
# Effect of arrowsize parameter
arrows!(ax,Point3f[(0,0,0)],Point3f[(1,0,0)],color = RGBAf(255,0,0,1),arrowsize = 0.5)
arrows!(ax,Point3f[(0,0,0)],Point3f[(1,0,0)],color = RGBAf(0,255,0,0.5),arrowsize = 1)
# Just for fun effect of align parameter (surprising ?)
poss = (:head, :lineend, :tailend, :headstart, :center,:origin)
for (z,pos) in enumerate(poss)
arrows!(ax,Point3f[(0,0,z)],Point3f[(1,0,0)],color = RGBAf(0,0,255,0.5),align=pos,arrowsize = 1)
end
display(GLMakie.Screen(),fig)

```

this gives

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

> [@jules](#):
>
> the only question is what to do in the edge case where the arrow head is longer than the distance between the points.

I would argue that the problem is the same today, as increasing the “size” of the arrow head also increases the length of the arrow, if you specific this size as a scalar.  
In any case, setting a very large arrow head may not be relevant sometimes.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [December 5, 2022, 4:29pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371/6 "2022-12-05T16:29:52Z")

</div>

@sdanisch Just created an issue !
