summaryrefslogtreecommitdiff
path: root/Dot.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Dot.hs')
-rw-r--r--Dot.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Dot.hs b/Dot.hs
index fcd0c19cc..a21d70536 100644
--- a/Dot.hs
+++ b/Dot.hs
@@ -41,13 +41,18 @@ fillColor :: String -> String -> String
fillColor color s = attr "fillcolor" color $ attr "style" "filled" $ s
{- apply to graphNode to put the node in a labeled box -}
-subGraph :: String -> String -> String -> String
-subGraph subid l s =
- "subgraph " ++ name ++ " {\n" ++ ii setlabel ++ ii s ++ indent "}"
+subGraph :: String -> String -> String -> String -> String
+subGraph subid l color s =
+ "subgraph " ++ name ++ " {\n" ++
+ ii setlabel ++
+ ii setcolor ++
+ ii s ++
+ indent "}"
where
-- the "cluster_" makes dot draw a box
name = quote ("cluster_" ++ subid)
setlabel = "label=" ++ quote l
+ setcolor = "fillcolor=" ++ quote color
ii x = (indent $ indent x) ++ "\n"
indent ::String -> String