Graphviz
Graphviz | |
---|---|
Basic data
|
|
developer | AT&T Labs Research |
Publishing year | before 1991 |
Current version | 2.40.1 (December 25, 2016) |
Current preliminary version | 2.41 |
operating system | Multiplatform |
programming language | ANSI C |
License | Eclipse Public License |
German speaking | No |
http://www.graphviz.org |
![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/UnitedStatesGraphViz.svg/250px-UnitedStatesGraphViz.svg.png)
Common borders of the 48 contiguous states of the USA are shown by lines
Graphviz is one of AT & T and Bell Labs developed cross-platform open source - software package for visualization of objects and their inter-relationships. In mathematical terms, Graphviz visualizes directional and undirected graphs .
Graphviz takes all the instructions required to generate the graphic from a text file that contains a description of the nodes and edges of the graph. The positions of the individual nodes and the curvature of the edges are automatically calculated from this description and optimized in such a way that the structure of the graph can be easily recognized. The DOT markup language is used to describe the graph to be displayed . It is syntactically based on the C programming language . If required, Graphviz also offers additional options for changing the layout as well as the shape and color of the graph.
Often the structure definition of the graph is sufficient to generate a reasonable output. Therefore, not only humans, but also automatic processes can use Graphviz to create visualizations. Changes can also be made to existing graphs very quickly, which is not easily possible with a standard graphics program.
Graphviz offers various methods for visualizing graphs:
- dot
- For displaying hierarchical structures. All edges run in roughly the same direction, from top to bottom or from left to right. Overlapping of the edges is avoided as much as possible and the edge length is kept as short as possible.
- neato and fdp
- Visualizes graphs in the so-called “spring model” layout. The start node is created in the middle. Neato uses the Kamada-Kawai algorithm for this . Fdp implements the Fruchterman-Reingold heuristic for larger graphs.
- twopi
- Radial layout, after Graham Wills.
- circo
- Circular layout, based on Six and Tollis.
The DOT source code can be Graphviz z. B. be transferred as a text file via a command line command . By default, Graphviz generates the DOT source code as a text file in which the attributes for the position and size of the nodes and edges are specified. An image file can also be created as output via Graphviz . The file formats PostScript , SVG , JPEG , PNG and PDF , among others, are supported .
example
The following definition creates the directed graph, the image of which is shown on the right.
digraph Beziehungen {
nodesep=0.7
Jutta -> Franz [label="liebt"]
Bernd -> Franz [label="hasst"]
Franz -> Bernd [label="hasst"]
Franz -> Jutta [label="liebt"]
Bernd -> Jutta [label="liebt"]
}
The actual image was generated with the following command:
dot -Tsvg eingabe.dot -o "Beziehung Graphviz.svg"
The parameter -T
defines the file format of the output file. Without the parameter -T
you would get the following extended definition of the graph, which can be saved in another dot file.
digraph Beziehungen {
graph [nodesep="0.7"];
node [label="\N"];
graph [bb="0,0,137,212"];
Jutta [pos="106,194", width="0.75", height="0.50"];
Franz [pos="29,106", width="0.81", height="0.50"];
Bernd [pos="102,18", width="0.83", height="0.50"];
Jutta -> Franz [label=liebt, pos="e,20,124 79,191 59,186 32,178 19,158 14,151 14,142 16,133", lp="34,150"];
Bernd -> Franz [label=hasst, pos="e,42,90 88,34 77,48 61,67 49,82", lp="83,62"];
Franz -> Bernd [label=hasst, pos="e,72,22 19,89 14,78 10,64 17,54 27,38 45,29 62,25", lp="31,62"];
Franz -> Jutta [label=liebt, pos="e,92,178 43,122 55,136 72,155 85,170", lp="86,150"];
Bernd -> Jutta [label=liebt, pos="e,109,176 107,36 108,42 109,48 110,54 118,124 112,132 111,158 111,161 110,163 110,166", lp="125,106"];
}
Logical images with Graphviz
With Graphviz you can also create logical images . Logical images represent a situation by means of a schematic drawing (in contrast to a textual representation of the situation, such as this text). Example: The picture on the right shows important formatting capabilities of Graphviz for the objects it visualized. To do this, it uses a display technique that is similar to that of a mind map .
Since Graphviz can generate a clear visualization from a pure description of objects and their relationships to one another, it is well suited for quickly creating illustrative diagrams. The large wiki suites can interpret the DOT description language with the help of a plug-in directly in the wiki source text and display it as an image. When using these plugins it is not necessary to use the command line. This means that Graphviz can be used in a wiki to illustrate complex relationships.
Use in other programs
Graphviz or the DOT format is used in the following programs:
- ArgoUML , a UML tool . DOT files can be generated from XMI via XSLT with argouml-graphviz.
- AsciiDoc , a simplified markup language .
- Bison , a universal parser generator , can generate DOT files for debugging.
- Doxygen , a software documentation tool , can optionally use Graphviz to generate a wide variety of diagrams.
- FreeCAD uses Graphviz to show the dependencies between objects in documents.
- Gephi , a network analysis software package , has a Graphviz plugin.
- Gramps , a genealogy program , uses Graphviz to generate family trees.
- Org-mode , a program for the text editor Emacs , can work with DOT source code.
- PlantUML uses Graphviz to generate UML diagrams from a text description.
- Puppet , an administration program , can generate DOT files.
- Scribus , a desktop publishing program. It renders graphs using its internal editor in a special type of frame called a Render Frame.
- Sphinx , a software documentation tool .
- Trac , a project management tool, has a Graphviz plugin.
- WikidPad , a Python-based wiki software, uses Graphviz as a plugin.
See also
Web links
-
graphviz.org - official homepage (English)
- some example graphs
Individual evidence
- ↑ Extension: GraphViz - MediaWiki. Retrieved October 21, 2018 .
- ↑ argouml-graphviz.tigris.org . Retrieved January 15, 2018.
- ↑ Graphviz filter for AsciiDoc. Retrieved October 23, 2018 .
- ↑ Bison 3.1. Retrieved October 21, 2018 .
- ^ Doxygen Manual. July 2, 2018, accessed October 23, 2018 .
- ↑ Std DependencyGraph .
- ↑ GraphViz DOT format. In: Learn how to use Gephi - Supported Graph Formats. Retrieved October 23, 2018 .
- ↑ Howto: Make a relationship chart - Gramps. Retrieved October 23, 2018 .
- ↑ Karl Voit: Org tutorial on generating simple process diagrams using dot and tables ( en ) Retrieved January 15, 2018.
- ↑ Integration of Dot diagrams. In: PlantUML - A brief overview. Retrieved October 24, 2018 .
- ↑ Visualizing Puppet manifest resources and relationships - jansipke.nl . In: jansipke.nl . September 13, 2013 ( jansipke.nl [accessed October 23, 2018]).
- ↑ Cedric Gemy: Understanding the render frame. In: Scribus 1.3.5: Beginner's Guide. Retrieved October 24, 2018 .
- ^ Add Graphviz graphs. In: Sphinx 2.0.0 documentation. Retrieved October 24, 2018 .
- ↑ GraphvizPlugin - Trac Hacks - Plugins Macros etc. . Retrieved January 15, 2018.
- ↑ wikidPad: ExternalGraphicalApplications. Retrieved October 23, 2018 .