Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

manual layout of graphs described in graphviz (DOT) format

Tags:

graphviz

dot

I have a graph that I've written down as a DOT file. I picked this because it's pretty easy to read and write programmatically, and I have a fair amount of tooling that uses the DOT file as input.

Graphviz does a decent job drawing it, but not a great job. (And that's all it's really meant to do, as far as I know.)

I am looking for, and cannot find, a tool that will read in the DOT file and let me manually drag around the vertices and edges I've already described in the DOT file similar to https://www.draw.io.

The thing that I really do not want to do is manually re-enter the graph I've already written down (or computed as output from a program or whatever) into draw.io and then have two different files that may or may not have the same set of edges and vertices because of transcription errors.

Ideally, I want something that will write its own file of only the metadata about where things are drawn, without adding a bunch of cruft to the DOT file, so that the tooling I have there still works and I can still use it as the unified representation of the graph between a bunch of different tasks.

like image 378
kortec Avatar asked Apr 26 '16 16:04

kortec


People also ask

How do you make a graph on Graphviz?

Create a graph object, assemble the graph by adding nodes and edges, and retrieve its DOT source code string. Save the source code to a file and render it with the Graphviz installation of your system. Use the view option/method to directly inspect the resulting (PDF, PNG, SVG, etc.) file with its default application.

What is DOT in flowchart?

Similar to undirected graphs, DOT can describe directed graphs, such as flowcharts and dependency trees. The syntax is the same as for undirected graphs, except the digraph keyword is used to begin the graph, and an arrow (->) is used to show relationships between nodes. digraph graphname { a -> b -> c; b -> d; }

How do I convert a DOT file to a graph?

For windows: dl the msi and install; Find gvedit.exe in your programs list; Open . dot file in question; Click running person on toolbar; Go to graph -> settings ; change Output file type to file type of your liking and press ok..

What is the DOT language called?

What is Braille? Braille is a system of touch reading and writing for blind persons in which raised dots represent the letters of the alphabet. It also contains equivalents for punctuation marks and provides symbols to show letter groupings.


1 Answers

You can run dot requesting output as another dot file with the command dot -Tdot. dot will then calculate the layout but instead of outputting a pictorial representation, it will output another dot file with exactly the same information as the input, with the addition of layout information as additional attributes. You can then edit the layout information by hand and run it through dot a second time to obtain the pictorial representation.

If your tools process a dot file properly, they should be able to process a dot file with layout attributes.

If you want a WYSIWYG tool to aid in the hand-layout process, take a look at dotty.

like image 114
Edward Doolittle Avatar answered Sep 20 '22 01:09

Edward Doolittle