How can I go from graphviz input to something I can hand edit with a mouse?

14

2

I'd like to take a simple graphviz input file (or alternatively something as simple as the X -> Y notation) and have a graph where I can reorganize the positioning of the nodes without having to specify the coordinates by hand. Is there there a way to do this?

Eugene M

Posted 2009-07-22T05:02:35.493

Reputation: 853

Answers

6

If you run graphviz in SVG output mode, you'll get an SVG file, which you can then edit easily (e.g., with Inkscape).

dot -Tsvg foo.dot > foo.svg

or neato, or whatever. -Tfig (xfig), -Tmif (FrameMaker) -Tps (PostScript), and -Tdia (dia, Linux/GTK diagraming tool) may also work, depending on what software you have available. A complete list of output formats is available.

Of course, the point of graphviz is that you don't have to lay it out by hand... have you looked at some of the graphviz options? They may alleviate whatever problem you're having.

derobert

Posted 2009-07-22T05:02:35.493

Reputation: 3 366

0

Depending on your needs for editing you can do:

neato -Tsvg pollo.graph > pollo.svg

And then you can edit the file with inkscape, for instance.

The problem is thatt it doesn't maintain connections between objects.

chmeee

Posted 2009-07-22T05:02:35.493

Reputation: 296

dia format maintains connections – derobert – 2009-07-22T05:27:57.150

I've tried and it doesn't by default, you have to connect them yourself. – chmeee – 2009-07-22T05:35:12.547

Umm, I just tried it before posting that comment. I used dot; maybe neato is different... graphviz version 2.20.2 here. – derobert – 2009-07-22T06:48:42.573

1strange, I have the same graphviz version but dia does not connect, not even with dot... I'll try some other files later – chmeee – 2009-07-22T09:12:09.840