How to align an object relative to nodes of another object in Inkscape?

I’d like to align one object to the nodes of another object. In the screenshot below, I’d like to horizontally align the text below to the axis marker that’s represented by the two selected nodes above.

Part of an X axis and a manual label

I could duplicate the axis, select all nodes that don’t belong to that small vertical line, delete them, do the alignment and then delete the temporary object. But since I didn’t even find a way to invert the selection of nodes, this process is very laborious and error-prone. So any better way to do this is much appreciated!

Answer

What I would do in this case is the following:

  1. Select the two nodes relevant for alignment

    enter image description here

  2. Choose Path > Break apart to generate a separate object from the vertical line.

  3. Select first the text, then the vertical line

    enter image description here

  4. Now open Object > Align and distribute with setting Relative to Last selected

    enter image description here

  5. Align the objects according to needs:

    • To align the left of the text choose Align left edge to right edge of anchor: enter image description here

      enter image description here

    • To center choose Center on vertical axis: enter image description here

      enter image description here

  6. Now select the horizontal top line and the vertical line and choose Path > Combine to combine them to one object again.

Attribution
Source : Link , Question Author : Christian , Answer Author : Takkat

Leave a Comment