library(graphviz),
a binding to the layout part of the Graphviz
libraries. It lays out a graph given in the DOT language and returns the
positions of the nodes and the routes of the edges as a Prolog term.
Nothing is rendered: the nodes and labels are drawn by the application,
which tells Graphviz only their size. It is used by library(graphviz_layout)
of XPCE.
This library calls the layout functions of the graphviz libraries. It
only uses the layout part of graphviz: there is no rendering and no text
layout. It is intended for laying out graphs whose nodes and labels are
drawn by the application, which tells graphviz only their size. See library(graphviz_layout)
of xpce.
If possible, the binding is linked with the dot layout plugin. Other layout plugins are opened when an engine they provide is first used. Graphviz’ own plugin loading, which also loads its text layout and rendering plugins, is used only if no layout plugin was found when the library was built.
dot does not load the neato
plugin and its dependencies.dot. Layout
is a term
layout(bb(X0,Y0,X1,Y1), Nodes, Edges, Clusters)
in graphviz coordinates: points, with Y growing upwards.
node(Name, point(X,Y)), the centre
of the node named Name in Dot.
edge(Id, Route), where Id is the id
attribute of the edge (an atom, ” if not set) and Route is
route(Points, Start, End, Label). Points is the list of
control points of a cubic B-spline. Start and End are none
or the tip of the arrow at that end. Label is none or the
centre of the label.
cluster(Name, bb(X0,Y0,X1,Y1), Label)
for the subgraphs whose name starts with cluster, outer
clusters before the clusters they hold. Label is none or
the centre of the label.
Messages is a string holding the warnings of graphviz.
The Prolog and C sources of this package are licensed under the
Simplified BSD license, as the rest of SWI-Prolog. Graphviz, which it
links to, is licensed under the
Eclipse
Public License 1.0. Loading library(graphviz) registers
this license, such that
license/0
reports it.