Bindings to Graphviz for graph visualisation. (http://projects.haskell.org/graphviz/)
#7Fails to display some edges
I'm converting from FGL. I want to get undirected graph, so I put edges in only one direction. However, if I add edge (X, Y, label) when X>Y, the edge does not appear in the resulting dot output.
graphInDot :: DotGraph Node
graphInDot = graphToDot nonClusteredParams{ isDirected = False
, fmtNode = dotPrint
, fmtEdge = \(_,_,el) -> [Label . StrLabel . T.pack . show $ el]
}
exampleFoo
exampleFoo :: Gr String Int
exampleFoo = mkGraph [ ( 0, "stuff, things")
, ( 1, "stuff, things")
, ( 2, "stuff, things")
, ( 3, "stuff, things")
, ( 4, "stuff, things")
, ( 5, "stuff, things")
, ( 6, "stuff, things")
, ( 7, "stuff, things")
, ( 8, "stuff, things")
, ( 9, "stuff, things")
, (10, "stuff, things")
, (12, "stuff, things")
, (13, "stuff, things")
, (11, "stuff, things")
, (14, "stuff, things")
, (15, "stuff, things")
]
$ map workaround
[ ( 1, 12, 0)
, ( 4, 12, 10)
, (12, 13, 11)
, ( 4, 5, 1)
, ( 5, 6, 2)
, ( 5, 8, 3)
, ( 8, 10, 4)
, ( 0, 7, 5)
, ( 2, 7, 6)
, ( 7, 9, 7)
, ( 9, 11, 8)
, ( 3, 9, 9)
, (15, 11, 12) -- problem here
, (14, 11, 13) -- problem here
]