I would like to create a Graphics similar to the top one here: enter image description here

, but I can obtain only the bottom one.

I use this:


How can I show the blue line inside the rectangle?

How can I make bigger the top of the arrow?


2 Answers 2


Change White to:

  • $\begingroup$ That works. Can I do something for the thickness of the extreme of the arrow? $\endgroup$
    – Ale1794
    Jun 8, 2017 at 16:36
  • $\begingroup$ Use: Arrowheads[.1] $\endgroup$ Jun 8, 2017 at 16:44

Since the graphics primitives are layered in the order they appear, an alternative approach is to have the Rectangle before the Arrow primitives. This can be done by using RotateRight on the list of graphics primitives:

graphics = Graphics[{{Arrow[{{0, -4}, {0, 5}}]}, 
    {Red, Thickness[0.03], Arrow[{{0, 1}, {0, 4}}]},
    {Blue, Thickness[0.03], Arrow[{{0, 0}, {0, -3.5}}]}, 
    {EdgeForm[Directive[Thick]], White, Rectangle[{-1, -1}, {1, 1}]}}];

MapAt[{Arrowheads[.2], RotateRight@#} &, graphics, {1}]

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.