Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
DOT (graph description language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Attributes === [[File:DotLanguageAttributes.svg|right|thumb|A graph with attributes]] Various attributes can be applied to graphs, nodes and edges in DOT files.<ref>{{cite web|title=Node, Edge and Graph Attributes|url=http://www.graphviz.org/doc/info/attrs.html |website=graphviz.org|access-date=2017-05-12}}</ref> These attributes can control aspects such as color, shape, and line styles. For nodes and edges, one or more [[attribute–value pair]]s are placed in square brackets <code>[]</code> after a statement and before the semicolon (which is optional). Graph attributes are specified as direct attribute–value pairs under the graph element, where multiple attributes are separated by a comma or using multiple sets of square brackets, while node attributes are placed after a statement containing only the name of the node, but not the relations between the dots. <syntaxhighlight lang="dot"> graph graphname { // This attribute applies to the graph itself size="1,1"; // The label attribute can be used to change the label of a node a [label="Foo"]; // Here, the node shape is changed. b [shape=box]; // These edges both have different line properties a -- b -- c [color=blue]; b -- d [style=dotted]; // [style=invis] hides a node. } </syntaxhighlight>HTML-like labels are supported, although initially Graphviz did not handle them.<ref>{{cite web|url=http://www.graphviz.org/doc/info/shapes.html#html|title=Node Shapes: HTML-Like Labels|website=graphviz.org|access-date=2017-05-12}}</ref>{{-}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)