graphviz-2008.7.10: GraphViz wrapper for HaskellSource codeContentsIndex
Data.GraphViz
Synopsis
graphToDot :: Graph gr => gr a b -> [Attribute] -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> DotGraph
graphToGraph :: forall gr a b. Graph gr => gr a b -> [Attribute] -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> IO (gr (AttributeNode a) (AttributeEdge b))
readDotGraph :: Parser Char DotGraph
data DotGraph = DotGraph {
graphAttributes :: [Attribute]
graphNodes :: [DotNode]
graphEdges :: [DotEdge]
}
data DotNode = DotNode {
nodeID :: Int
nodeAttributes :: [Attribute]
}
data DotEdge = DotEdge {
edgeHeadNodeID :: Int
edgeTailNodeID :: Int
edgeAttributes :: [Attribute]
}
type AttributeNode a = ([Attribute], a)
type AttributeEdge b = ([Attribute], b)
module Data.GraphViz.Attributes
Documentation
graphToDot :: Graph gr => gr a b -> [Attribute] -> (LNode a -> [Attribute]) -> (LEdge b -> [Attribute]) -> DotGraphSource
Convert a graph to dot format. You can then write this to a file and run dot on it
graphToGraph :: forall gr a 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
readDotGraph :: Parser Char DotGraphSource
data DotGraph Source
Constructors
DotGraph
graphAttributes :: [Attribute]
graphNodes :: [DotNode]
graphEdges :: [DotEdge]
show/hide Instances
data DotNode Source
Constructors
DotNode
nodeID :: Int
nodeAttributes :: [Attribute]
show/hide Instances
data DotEdge Source
Constructors
DotEdge
edgeHeadNodeID :: Int
edgeTailNodeID :: Int
edgeAttributes :: [Attribute]
show/hide Instances
type AttributeNode a = ([Attribute], a)Source
type AttributeEdge b = ([Attribute], b)Source
module Data.GraphViz.Attributes
Produced by Haddock version 2.3.0