Advertisement


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


Question

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!

2014/05/16
1
5
5/16/2014 6:23:00 PM

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

2014/05/16
7
5/16/2014 9:08:00 PM

I'd :

  • create another vertical segment
  • center align it with the '1/4pi' text
  • copy the "x" value of a node of this segment
  • apply it to the two selected nodes.
2014/05/16