graphviz-2999.1.0.1: GraphViz bindings for Haskell.

MaintainerIvan.Miljenovic@gmail.com

Data.GraphViz

Description

This is the top-level module for the graphviz library. It provides functions to convert Graphs into the Dot language used by the GraphViz program (as well as a limited ability to perform the reverse operation).

Information about GraphViz and the Dot language can be found at: http://graphviz.org/

Synopsis

Documentation

graphToDot :: (Ord b, Graph gr) => gr a b -> [Attribute] -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> DotGraphSource

Convert a graph to GraphViz's Dot format.

clusterGraphToDot :: (Ord c, Ord b, Graph gr) => gr a b -> [Attribute] -> (LNode a -> NodeCluster c a) -> (c -> [Attribute]) -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> DotGraphSource

Convert a graph to Dot format, using the specified clustering function to group nodes into clusters. Clusters can be nested to arbitrary depth.

graphToGraph :: (Ord b, Graph gr) => gr a b -> [Attribute] -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> IO (gr (AttributeNode a) (AttributeEdge b))Source

Run the graph via dot to get positional information and then combine that information back into the original graph. Note that this doesn't support graphs with clusters.

dotizeGraph :: (DynGraph gr, Ord b) => gr a b -> gr (AttributeNode a) (AttributeEdge b)Source

Pass the plain graph through graphToGraph. This is an IO action, however since the state doesn't change it's safe to use unsafePerformIO to convert this to a normal function.

data NodeCluster c a Source

Define into which cluster a particular node belongs. Nodes can be nested to arbitrary depth.

Constructors

N (LNode a) 
C c (NodeCluster c a) 

Instances

(Show c, Show a) => Show (NodeCluster c a)