Graphalyze-0.3: Graph-Theoretic Analysis library.Source codeContentsIndex
Data.Graph.Analysis.Visualisation
MaintainerIvan.Miljenovic@gmail.com
Contents
Graph visualisation
Creating images
Showing node groupings
Description
Functions to assist in visualising graphs and components of graphs. This module uses code licensed under the 3-Clause BSD license from the mohws project: http://code.haskell.org/mohws/src/Util.hs
Synopsis
graphviz :: (Graph g, Show a, Ord b) => String -> g a b -> DotGraph
graphvizClusters :: (Graph g, Show c, ClusterLabel a c, Ord b) => String -> g a b -> DotGraph
data GraphvizOutput
= Canon
| Cmap
| Cmapx
| Cmapx_np
| Dia
| DotOutput
| Eps
| Fig
| Gd
| Gd2
| Gif
| Gtk
| Hpgl
| Imap
| Imap_np
| Ismap
| Jpe
| Jpeg
| Jpg
| Mif
| Mp
| Pcl
| Pdf
| Pic
| Plain
| PlainExt
| Png
| Ps
| Ps2
| Svg
| Svgz
| Tk
| Vml
| Vmlz
| Vrml
| Vtx
| Wbmp
| Xdot
| Xlib
data GraphvizCommand
= DotCmd
| Neato
| TwoPi
| Circo
| Fdp
runGraphviz :: DotGraph -> GraphvizOutput -> FilePath -> IO Bool
runGraphvizCommand :: GraphvizCommand -> DotGraph -> GraphvizOutput -> FilePath -> IO Bool
showPath :: Show a => LNGroup a -> String
showCycle :: Show a => LNGroup a -> String
showNodes :: Show a => LNGroup a -> String
Graph visualisation
Simple wrappers around the Haskell Data.GraphViz library to turn Graphs into basic DotGraphs for processing by the Graphviz application.
graphviz :: (Graph g, Show a, Ord b) => String -> g a b -> DotGraphSource
Turns the graph into DotGraph format with the given title. Nodes are labelled, edges aren't.
graphvizClusters :: (Graph g, Show c, ClusterLabel a c, Ord b) => String -> g a b -> DotGraphSource
Turns the graph into DotGraph format with the given title. Cluster the nodes based upon their ClusterLabel clusters. Nodes and clusters are labelled, edges aren't.
Creating images
data GraphvizOutput Source
The possible Graphviz outputs, obtained by running dot -Txxx. Note that it is not possible to choose between output variants, and that not all of these may be available on your system.
Constructors
Canon
Cmap
Cmapx
Cmapx_np
Dia
DotOutput
Eps
Fig
Gd
Gd2
Gif
Gtk
Hpgl
Imap
Imap_np
Ismap
Jpe
Jpeg
Jpg
Mif
Mp
Pcl
Pdf
Pic
Plain
PlainExt
Png
Ps
Ps2
Svg
Svgz
Tk
Vml
Vmlz
Vrml
Vtx
Wbmp
Xdot
Xlib
show/hide Instances
data GraphvizCommand Source
The available Graphviz commands.
Constructors
DotCmd
Neato
TwoPi
Circo
Fdp
show/hide Instances
runGraphviz :: DotGraph -> GraphvizOutput -> FilePath -> IO BoolSource
Run the recommended Graphviz command on this graph, saving the result to the file provided (note: file extensions are not checked).
runGraphvizCommand :: GraphvizCommand -> DotGraph -> GraphvizOutput -> FilePath -> IO BoolSource
Run the chosen Graphviz command on this graph, saving the result to the file provided (note: file extensions are not checked).
Showing node groupings
Other visualisations. These are mainly replacements for the show function.
showPath :: Show a => LNGroup a -> StringSource
Print a path, with "->" between each element.
showCycle :: Show a => LNGroup a -> StringSource
Print a cycle: copies the first node to the end of the list, and then calls showPath.
showNodes :: Show a => LNGroup a -> StringSource
Show a group of nodes, with no implicit ordering.
Produced by Haddock version 2.1.0