When I add markers to a path in Inkscape (e.g. arrowheads), they do not exactly end at the end of the path. How can I position the arrowhead so that it exactly ends at the end of the path?
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityWhen I add markers to a path in Inkscape (e.g. arrowheads), they do not exactly end at the end of the path. How can I position the arrowhead so that it exactly ends at the end of the path?
The point at which the marker will “graft” onto the path is the center of the defined marker (i.e. 0,0).
You can position it by changing the path definition either globally in the markers.svg
(on Windows something like c:\programs\Inkscape\share\markers\markers.svg
), or by changing the marker definition in the SVG itself with the XML editor.
In the image below, I have changed the tip of the arrow to be at 0,0.
However, it is hard to get the position 100% correct since the stroke of the arrow will add some width.
One problem you might encounter (depending on your “main” path definition, size of marker, width of path, etc.) is that the main path might bleed through the marker (see below)
The path marker functionality in Inkscape is woefully limited. I would suggest creating your arrowhead as a separate path object, from scratch. It's definitely cumbersome for designs that include a large number of arrows, but you will have a lot more control over the size and position of the arrowhead.
An alternative to the other options in this thread: you can change the nodes by adding a border. Like so:
The border must be chosen so that it sits at the right distance from the node. Then simply group the node and the border together, and make the border invisible. A connector will now sit at exactly the distance you want it to be.
The disadvantage of this is that the backedges are now also at a distance from the node. This may or may not be a problem for you. If it is, then one way of solving this is creating an "extension marker". Create a horizontal line: and choose "object to marker" in the "object" menu.
Then select this new marker as a start marker for your connectors.
I find having "Snap bounding boxes" enabled is the easiest way to make sure that the arrow tip gets aligned to the edge of the other item.
I then resise the stroke with the arrow head such that it aligns with the bounding box of the line. Take a look at this screenshot for the snap settings
and the screenshot below for this method in action in inkscape.
My way:
1) Draw your arrow and an extra line/bar
2) Place the arrow manually (without snapping) as you wish the arrowhead shall be to other objects. Place the bar at the arrowhead (snapping).
3) Make the bar 100% transparent (0% opaque).
Finally: Group the arrow and the bar so you can use copies of this group for well aligned/positioned arrows.