TransWikia.com

Custom arrowhead will not align properly

Mathematica Asked by Bjoj on June 26, 2021

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.)

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP