How to set cluster font attributes in Graphviz?

I can successfully change the border font and node font, but my attempts to change the cluster labels are not affected. Can someone point me in the right direction?

I tried labelfontname=, fontname=(around the edge and node), but cannot find the magic formula for cluster labels.

+5
source share
1 answer

fontname works with cluster labels.

Here is an example with illustrations - it's quite simple, just set it before setting the contents of the label.

digraph g{
  node[fontname="Impact"];
  subgraph cluster0 {
    "Cluster node";
    fontname="Courier";
    label="Cluster label";
  }
  fontname="Arial";
  label="Graph Label";
}

Result:

graphviz output showing the effect of fontname on a cluster

+6
source

All Articles