This module defines functions to call the various Graphviz commands.
Whilst various output formats are supported (see
for a complete list), it is not yet possible to choose a desired
renderer and formatter. Being able to determine which renderers
and formatters are applicable for a specific
not easy (there is no listing of available renderers or formatters
on the Graphviz website), and for the most part the default ones do
the job well.
Please note that for
will see that they are instances of a
GraphvizResult class; this is
an internal class that should not be visible outside this module, but
Haddock is being too helpful for its own good.
- data GraphvizCommand
- dirCommand :: GraphvizCommand
- undirCommand :: GraphvizCommand
- commandFor :: DotRepr dg n => dg n -> GraphvizCommand
- data GraphvizOutput
- data GraphvizCanvas
- runGraphviz :: PrintDotRepr dg n => dg n -> GraphvizOutput -> FilePath -> IO FilePath
- runGraphvizCommand :: PrintDotRepr dg n => GraphvizCommand -> dg n -> GraphvizOutput -> FilePath -> IO FilePath
- addExtension :: (GraphvizOutput -> FilePath -> a) -> GraphvizOutput -> FilePath -> a
- runGraphvizCanvas :: PrintDotRepr dg n => GraphvizCommand -> dg n -> GraphvizCanvas -> IO ()
- runGraphvizCanvas' :: PrintDotRepr dg n => dg n -> GraphvizCanvas -> IO ()
- graphvizWithHandle :: PrintDotRepr dg n => GraphvizCommand -> dg n -> GraphvizOutput -> (Handle -> IO a) -> IO a
- isGraphvizInstalled :: IO Bool
- quitWithoutGraphviz :: String -> IO ()
The different Graphviz tools available.
The available Graphviz commands. The following directions are
based upon those in the Graphviz man page (available online at
http://graphviz.org/pdf/dot.1.pdf, or if installed on your
man graphviz). Note that any command can be used on
both directed and undirected graphs.
When used with the
Layout attribute, it overrides any actual
command called on the dot graph.
For hierachical graphs (ideal for directed graphs).
For symmetric layouts of graphs (ideal for undirected graphs).
For radial layout of graphs.
For circular layout of graphs.
Spring-model approach for undirected graphs.
As with Fdp, but ideal for large graphs.
Filter for drawing clustered graphs, requires Graphviz >= 2.28.0.
Draw clustered graphs as treemaps, requires Graphviz >= 2.28.0.
The appropriate (default) Graphviz command for the given graph.
The possible outputs that Graphviz supports.
The list of output types supported by Graphviz is dependent upon
how it is built on your system. To determine which actual formats
are available on your system, run
dot -T?. Trying to use an
output type that is not supported by your installation of Graphviz
will result in an error.
The possible Graphviz output formats (that is, those that actually produce a file).
Windows Bitmap Format.
Pretty-printed Dot output with no layout performed.
Reproduces the input along with layout information.
FIG graphics language.
Internal GD library format.
Compressed version of
Graphics Interchange Format.
Icon image file format.
The JPEG image format.
Portable Document Format.
Simple text format.
Portable Network Graphics format.
PostScript for PDF.
Scalable Vector Graphics format.
Compressed SVG format.
Tagged Image File Format.
Vector Markup Language;
Compressed VML format;
Virtual Reality Modeling Language
format; requires nodes to have a
third dimension set via the
Wireless BitMap format; monochrome format usually used for mobile computing devices.
Google's WebP format; requires Graphviz >= 2.29.0.
GraphvizOutput, these items do not produce an output
file; instead, they directly draw a canvas (i.e. a window) with
the resulting image.
Run the recommended Graphviz command on this graph, saving the result to the file provided (note: file extensions are not checked).
Run the chosen Graphviz command on this graph, saving the result to the file provided (note: file extensions are not checked).
Run the chosen Graphviz command on this graph and render it using the given canvas type.
Run the recommended Graphviz command on this graph and render it using the given canvas type.
|:: PrintDotRepr dg n|
Which command to run
|-> dg n|
|-> (Handle -> IO a)|
Extract the output
|-> IO a|
The error or the result.
Run the chosen Graphviz command on this graph, but send the result to the given handle rather than to a file.
If the command was unsuccessful, then a
Testing if Graphviz is installed
Is the Graphviz suite of tools installed? This is determined by
dot is available in the