class

Classnames to attach to the node, edge, graph, or cluster's SVG element

type: string, default: ""

Combine with stylesheet for styling SVG output using CSS classnames.

Multiple space-separated classes are supported.

See also:

Example:

digraph G {
  graph [class="cats"];

  subgraph cluster_big {
    graph [class="big_cats"];

    "Lion" [class="yellow social"];
    "Snow Leopard" [class="white solitary"];
  }
}
Valid on:
  • Edges
  • Nodes
  • Clusters
  • Graphs

Note: svg only.

Search the Graphviz codebase for "class"