How to implement a new layout style in Graphviz

Hello,

My partner and I are planning on implementing a new graph drawing layout algorithm of our design as a plugin for Graphviz. We are new to Graphviz and are unsure how to add new layout functionality to the structure of the source code. We would like to start by understanding how other layouts are implemented and what existing code we can draw upon, as we are not completely clear on how the files related to graph layout work together. We would like to use an existing force-directed algorithm as part of our own algorithm, and we need to specify not just the placement of the nodes but the shape of the edges as well. Any pointers in the right direction are very appreciated.

Thank you!
Kate
University of Arizona

[graphviz-devel] How to implement a new layout style in Graphv

On 4/8/11 8:00 AM, [email protected] wrote:
> My partner and I are planning on implementing a new graph drawing layout algorithm of our design
> as a plugin for Graphviz. We are new to Graphviz and are unsure how to add new layout
> functionality to the structure of the source code. We would like to start by understanding how
> other layouts are implemented and what existing code we can draw upon, as we are not completely
> clear on how the files related to graph layout work together. We would like to use an existing
> force-directed algorithm as part of our own algorithm, and we need to specify not just the
> placement of the nodes but the shape of the edges as well. Any pointers in the right direction are
> very appreciated.
In the doc subdirectory in the source tree, you will find the file addingLayout.txt. This gives
instructions as to what to do to add a new
layout. Basically, you just need to build a plug-in with two entry points, create a dynamic library
encapsulating it with a name in a
particular format, put that library with the other graphviz plug-ins, and run dot -c.

You should feel free to use any existing functions available in libgvc, with the warning that these
might change over time. If you indeed wish
to use one of the current force-directed algorithms, you may find it most convenient to fold your
layout into the neato plugin, as described
in addingLayout.txt. Alternatively, you could bind it with libneatogen_C or one of the other
convenience libraries, but I've never done this,
so don't know what might go wrong.

Edges are described as B-splines with arrowheads using the splines type defined in lib/common/types.h.

If you have any problems or questions, don't hesitate to ask.

Emden

P.S. I have moved the discussion to the graphviz-devel list.

_______________________________________________
graphviz-devel mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/graphviz-devel

Thank you!

Thank you very much for your quick response. We are looking at the document
now (and wondering why we didn't think to look there). We will let you know
if we have any questions.
Thanks again!
-Kate
_______________________________________________
[email protected]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest

How to implement a new layout style in Graphviz

Hello,

My partner and I are planning on implementing a new graph drawing layout
algorithm of our design as a plugin for Graphviz. We are new to Graphviz and
are unsure how to add new layout functionality to the structure of the source
code. We would like to start by understanding how other layouts are
implemented and what existing code we can draw upon, as we are not completely
clear on how the files related to graph layout work together. We would like
to use an existing force-directed algorithm as part of our own algorithm, and
we need to specify not just the placement of the nodes but the shape of the
edges as well. Any pointers in the right direction are very appreciated.

Thank you!
Kate
University of Arizona
_______________________________________________
[email protected]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest

Recent comments