Portability | portable |
---|---|
Stability | unstable |
Maintainer | Andy Gill <andygill@ku.edu> |
This module provides a simple interface for building .dot graph files, for input into the dot and graphviz tools. It includes a monadic interface for building graphs.
- data Dot a
- node :: [(String, String)] -> Dot NodeId
- data NodeId
- userNodeId :: Int -> NodeId
- userNode :: NodeId -> [(String, String)] -> Dot ()
- edge :: NodeId -> NodeId -> [(String, String)] -> Dot ()
- edge' :: NodeId -> Maybe String -> NodeId -> Maybe String -> [(String, String)] -> Dot ()
- (.->.) :: NodeId -> NodeId -> Dot ()
- showDot :: Dot a -> String
- scope :: Dot a -> Dot a
- attribute :: (String, String) -> Dot ()
- share :: [(String, String)] -> [NodeId] -> Dot ()
- same :: [NodeId] -> Dot ()
- cluster :: Dot a -> Dot (NodeId, a)
- netlistGraph :: Ord a => (b -> [(String, String)]) -> (b -> [a]) -> [(a, b)] -> Dot ()
Dot
Nodes
userNodeId :: Int -> NodeIdSource
userNodeId
allows a user to use their own (Int-based) node id's, without needing to remap them.
userNode :: NodeId -> [(String, String)] -> Dot ()Source
userNode
takes a NodeId, and adds some attributes to that node.
Edges
Showing a graph
Other combinators
share :: [(String, String)] -> [NodeId] -> Dot ()Source
share
is when a set of nodes share specific attributes. Usually used for layout tweaking.
cluster :: Dot a -> Dot (NodeId, a)Source
cluster
builds an explicit, internally named subgraph (called cluster).