# Is there an attribute to shorten the arrow tail at the tail?

**URL:** https://discourse.julialang.org/t/is-there-an-attribute-to-shorten-the-arrow-tail-at-the-tail/99982
**Category:** General Usage
**Tags:** makie
**Created:** [June 7, 2023, 3:05am UTC](https://discourse.julialang.org/t/is-there-an-attribute-to-shorten-the-arrow-tail-at-the-tail/99982 "2023-06-07T03:05:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![g2g](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@g2g](https://discourse.julialang.org/u/g2g)
#### Post date: [June 7, 2023, 3:05am UTC](https://discourse.julialang.org/t/is-there-an-attribute-to-shorten-the-arrow-tail-at-the-tail/99982/1 "2023-06-07T03:05:12Z")

</div>

I’m reading Eugenia Cheng’s book _The Joy of Abstraction - An Exploration of Math, Category Theory, and Life._ On page 61 there is an interesting diagram of all the order permutations of the multiplication 2 \* 3 \* 5 = 30 that looks like a cube because that multiplication is commutative.

 ![primes](https://global.discourse-cdn.com/julialang/original/3X/4/3/43c4b04bca9bc75a9ce130515ab8b641307679c0.png)

```julia
	X = [2, 2, 2]
	Y = [1, 1, 1]
	U = [-1, 0, 1]
	V = [1, 1, 1]
	arrows!(X,Y,U,V,
		arrowsize = 25,
		lengthscale = 0.74)

```

In my attempt to plot that diagram with GLMakie, there is an unwanted overlap of the arrow tails on the text. Is there some easy way to get lengthscale (or some other attribute) to shorten the arrow tail at the tail so that it doesn’t overlap the text?

Here’s the entire function to plot that diagram:

```julia
using GLMakie

function primes()

	# initialize figure
	fig = Figure(resolution = (800, 800))
	LIM = (0,5, 0,6)
	ls = 0.74 # arrow lengthscale
	vfs = 34 # vertex font size
	ax = Axis(fig[1,1], limits=LIM, aspect=1,
		title = "commutative diagram of 2*3*5=30");
	
	# commutative diagram for 2 * 3 * 5 = 30
	text!(2, 1, text = "1", 
		align = (:center, :center),
		fontsize = vfs)
	text!(4, 1, text = "0 primes",
		align = (:left, :center),
		fontsize = 20)
		
	text!([1,2,3], [2,2,2], text = ["2","3","5"], 
		align = (:center, :center),
		fontsize = vfs)
	X = [2, 2, 2]
	Y = [1, 1, 1]
	U = [-1, 0, 1]
	V = [1, 1, 1]
	arrows!(X,Y,U,V,
		arrowsize = 25,
		lengthscale = ls)
	text!(4, 2, text = "1 prime",
		align = (:left, :center),
		fontsize = 20)
	
	text!([1,2,3], [3,3,3], text = ["6","10","15"], 
		align = (:center, :center),
		fontsize = vfs)
	X = [1, 1, 2, 2, 3, 3]
	Y = [2, 2, 2, 2, 2, 2]
	U = [0, 1,-1, 1,-1, 0]
	V = [1, 1, 1, 1, 1, 1]
	arrows!(X,Y,U,V,
		arrowsize = 25,
		lengthscale = ls)
	text!(4, 3, text = "2 primes",
		align = (:left, :center),
		fontsize = 20)
	
	text!(2, 4, text = "30", 
		align = (:center, :center),
		fontsize = vfs)
	X = [1, 2, 3]
	Y = [3, 3, 3]
	U = [1, 0,-1]
	V = [1, 1, 1]
	arrows!(X,Y,U,V,
		arrowsize = 25,
		lengthscale = ls)
	text!(4, 4, text = "3 primes",
		align = (:left, :center),
		fontsize = 20)
	
	save("primes.png", fig)
	fig
end

```

---

<div class="post-metadata">

### Author: ![g2g](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@g2g](https://discourse.julialang.org/u/g2g)
#### Post date: [June 13, 2023, 3:08pm UTC](https://discourse.julialang.org/t/is-there-an-attribute-to-shorten-the-arrow-tail-at-the-tail/99982/2 "2023-06-13T15:08:34Z")

</div>

Setting the arrow color to gray helps a little as shown in the following animation that morphs between a tesseract constructed by a commutative diagram and the common perspective of a tesseract as a cube within a cube. The Julia and GLMakie code that generates this animation is in appendix A of [this essay](https://olarth.medium.com/4d-modeling-when-blind-acdac21552bf).

![primes4v](https://global.discourse-cdn.com/julialang/original/3X/6/6/668409b3044c9ead0090a5b4c6218dc5d0871903.gif)
