1

I am trying to put a custom arrowhead on an arrow I am drawing in a plot. My problem is that the (thick) line of the arrow is showing behind the arrow tip. So it seems like the arrowhead is aligned not at the tip of the line, but too far behind, so the line shows through. This is the code you can use to replicate it:

"Custom arrowhead"    
h = Graphics[{FilledCurve[{BSplineCurve[{{-1.48, 0.}, {-1.455, 
             0.3580000000000001}, {-2, 1}}], 
          BSplineCurve[{{-2, 1}, {-1.079, 0.44599999999999995}, {0, 0}}], 
          BSplineCurve[{{0, 
             0}, {-1.079, -0.44599999999999995}, {-2, -1}}], 
          BSplineCurve[{{-2, -1}, {-1.455, -0.3580000000000001}, {-1.48, 
             0.}}]}]}];

"Plot with arrow" Show[Plot[{}, {x, 0, .73}, PlotRange -> {{0, .73}, {0, 0.55}}, ImageSize -> Large], Graphics[{Thickness[0.005], Arrowheads[{{0.015, Automatic, h}}], Arrow[{{0.2, 0.12}, {0.24, 0.12}}]}]]

This is how the custom arrowhead looks like:

enter image description here

And this is how it looks like in the plot:

enter image description here

You can clearly see in the plot that the line itself is "showing through" the tip, making it "blunt" instead of sharp. How do I fix this?

(I've used the following recipe to customize the arrowhead.)

bjoj
  • 73
  • 6
  • 2
    Use Arrowheads[{{0.015, Automatic, {h, .5}}}] to foreshorten the shaft of the arrow from the arrowhead. Also use (* Custom arrowhead *) for your comment, not strings like "Custom arrowhead" – flinty Aug 17 '20 at 12:49
  • 1
    This is the standard reference example that flinty refers to. – CA Trevillian Aug 17 '20 at 15:17
  • @flinty this solved it, thank you. and thank you for the reference Trevillian – bjoj Aug 18 '20 at 08:34

0 Answers0