package ocamlgraph

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Graph.GraphvizSource

Interface with GraphViz

This module provides a basic interface with dot and neato, two programs of the GraphViz toolbox. These tools are available at the following URLs:

  • http://www.graphviz.org
  • http://www.research.att.com/sw/tools/graphviz

Common stuff

Because the neato and dot engines present a lot of common points - in particular in the graph description language, large parts of the code is shared. The CommonAttributes module defines attributes of graphs, vertices and edges that are understood by the two engines. Then module DotAttributes and NeatoAttributes define attributes specific to dot and neato respectively.

Common types and signatures

Sourcetype color = int
Sourcetype color_with_transparency = int32

The two least significant bytes encode the transparency information; the six most signification are the standard RGB color

Sourceval color_to_color_with_transparency : color -> color_with_transparency
Sourcetype arrow_style = [
  1. | `None
  2. | `Normal
  3. | `Onormal
  4. | `Inv
  5. | `Dot
  6. | `Odot
  7. | `Invdot
  8. | `Invodot
]
Sourcemodule type ATTRIBUTES = sig ... end

The ATTRIBUTES module type defines the interface for the engines.

Common attributes

Sourcemodule CommonAttributes : sig ... end

The CommonAttributes module defines attributes for graphs, vertices and edges that are available in the two engines, dot and neato.

Interface with the dot engine

Sourcemodule DotAttributes : sig ... end

DotAttributes extends CommonAttributes and implements ATTRIBUTES.

Sourcemodule type GraphWithDotAttrs = sig ... end

Graph module with dot attributes

Sourcemodule Dot (X : sig ... end) : sig ... end

The neato engine

Sourcemodule NeatoAttributes : sig ... end
Sourcemodule Neato (X : sig ... end) : sig ... end
OCaml

Innovation. Community. Security.