Maintainer | [email protected] |
---|
Data.GraphViz.Commands
Description
This module defines functions to call the various GraphViz commands.
Most of these functions were from version 0.5 of Graphalyze:
- data GraphvizCommand
- dirCommand :: GraphvizCommand
- undirCommand :: GraphvizCommand
- commandFor :: DotGraph a -> GraphvizCommand
- data GraphvizOutput
- runGraphviz :: PrintDot n => DotGraph n -> GraphvizOutput -> FilePath -> IO Bool
- runGraphvizCommand :: PrintDot n => GraphvizCommand -> DotGraph n -> GraphvizOutput -> FilePath -> IO Bool
- graphvizWithHandle :: (PrintDot n, Show a) => GraphvizCommand -> DotGraph n -> GraphvizOutput -> (Handle -> IO a) -> IO (Maybe a)
Documentation
dirCommand :: GraphvizCommandSource
The default command for directed graphs.
undirCommand :: GraphvizCommandSource
The default command for undirected graphs.
commandFor :: DotGraph a -> GraphvizCommandSource
The appropriate (default) GraphViz command for the given graph.
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.
This will probably be improved in future. For now, more information is available from: http://graphviz.org/doc/info/output.html
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 | |
Pic | |
Plain | |
PlainExt | |
Png | |
Ps | |
Ps2 | |
Svg | |
Svgz | |
Tk | |
Vml | |
Vmlz | |
Vrml | |
Vtx | |
Wbmp | |
Xdot | |
Xlib |
Instances
runGraphviz :: PrintDot n => DotGraph n -> 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).
Returns True
if successful, False
otherwise.
runGraphvizCommand :: PrintDot n => GraphvizCommand -> DotGraph n -> 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).
Returns True
if successful, False
otherwise.
graphvizWithHandle :: (PrintDot n, Show a) => GraphvizCommand -> DotGraph n -> GraphvizOutput -> (Handle -> IO a) -> IO (Maybe a)Source
Run the chosen Graphviz command on this graph, but send the result to the
given handle rather than to a file.
The result is wrapped in Maybe
rather than throwing an error.