0

I used GraphViz to create a diagram in a SVG file. The placement of the nodes is not ideal. I learnt that Inkscape can be used for editing SVG file.

Is there a way to drag and move a node, without breaking the edges between it and other nodes, but automatically stretch or shrink the edges?

For example, I have a svg file created by graphviz

enter image description here

and would like to drag the nodes roughly to a 2 by 3 array, and hope their edges automatically are adjusted, to look like

enter image description here

Thanks.

  • I suggest using yEd instead – joojaa Nov 26 '18 at 19:43
1

Yes, this is possible, but you would have to create all the arrows anew, using the connector tool (which also is a bit buggy).

So, for practical purposes, I'd say: No.

You can drag and rearrange everything pretty quickly, though.

To not lose the overview, I'd make a copy of the drawing in the same file, then you can check if the connections are still to the correct objects.

Use snapping to quickly snap the arrows to the edges of the circles.

1

Yes, at least partially:

  • If the graph node you want to move is an ellipsis object, select it and press shift+ctrl+C (or use the menu PathObject to Path).
  • Deselect everything by clicking on an empty spot.
  • Press ctrl+A to select all objects.
  • Use the node tool (F2) and select all nodes of the graph node as well as all adjacent nodes of the connected edges.
  • Move the nodes.

Text has to be moved manually.

Move a node

Alternative: Use a graph editing software like yEd to directly edited the graph instead of a svg image of that graph.

  • Thanks. How did you create the gif, if I may ask? – Ben Nov 26 '18 at 20:37
  • I used Peek, a gif recorder for linux. – Socowi Nov 26 '18 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.