# Why are my diagrams sometimes slammed to the left?

**URL:** https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533
**Category:** Help
**Created:** [November 7, 2024, 8:54pm UTC](https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533 "2024-11-07T20:54:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![clutter](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@clutter](https://forum.graphviz.org/u/clutter)
#### Post date: [November 7, 2024, 8:54pm UTC](https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533/1 "2024-11-07T20:54:09Z")

</div>

Greetings fellow visualizers. I have a system that reads data from our CM database and renders architectural dependency diagrams. Sometimes the diagram is not centered. Consider the follow example:  
[dot]  
digraph “Admitto”{  
splines=ortho  
layout=dot  
newrank=true  
node [shape=none,fontsize=12]  
graph [label=“2024-11-07 15:09:38-0500”,labelloc=b,fontsize=7]  
subgraph clusterall {graph [label=“Admitto (Database Middleware & ERP Support (DBA)/103666)”,labelloc=t,fontsize=25,color=transparent]  
edge [penwidth=1.0,arrowsize=0.5]  
subgraph clusterranks{label=“”;margin=0  
edge [color=transparent]  
node [fontcolor=transparent,fontsize=0,width=0.01,fixedsize=true,label=“”,margin=“0,0”]  
r0 → r1 → r2 → r3}  
subgraph clusterkey { color=black  
graph [label=“Archtitectural layer color key”,fontsize=12]  
edge [color=transparent]  
node [fontsize=12]  
Servicekey [label=“Service”,style=filled,fillcolor=lightgoldenrodyellow]  
Appkey [label=“App”,style=filled,fillcolor=khaki1]  
MiddleTierkey [label=“MiddleTier”,style=filled,fillcolor=khaki2]  
Databasekey [label=“Database”,style=filled,fillcolor=khaki3]  
Serverkey [label=“Server”,style=filled,fillcolor=lightsteelblue1]  
“Infrastructure Servicekey” [label=“Infrastructure Service”,style=filled,fillcolor=lightsteelblue2]  
“Configuration Managementkey” [label=“Configuration Management”,style=filled,fillcolor=lightsteelblue]  
Appliancekey [label=“Appliance”,style=filled,fillcolor=lightsteelblue3]  
Rackkey [label=“Rack”,style=filled,fillcolor=lightyellow3]  
Powerkey [label=“Power”,style=filled,fillcolor=snow3]  
{rank=same;r0;Servicekey;Appkey;MiddleTierkey;Databasekey;Serverkey;“Infrastructure Servicekey”;“Configuration Managementkey”;Appliancekey;Rackkey;Powerkey}  
Servicekey → Appkey → MiddleTierkey → Databasekey → Serverkey → “Infrastructure Servicekey” → “Configuration Managementkey” → Appliancekey → Rackkey → Powerkey}  
subgraph Service {style=filled;fillcolor=lightgoldenrodyellow  
node [style=filled,fillcolor=lightgoldenrodyellow]  
graph [label=“Services”,fontsize=18]  
}  
subgraph App {style=filled;fillcolor=khaki1  
node [style=filled,fillcolor=khaki1]  
graph [label=“Applications”,fontsize=18]  
}  
subgraph Middle {style=filled;fillcolor=khaki2  
node [style=filled,fillcolor=khaki2]  
graph [label=“Middle Tier”,fontsize=18]  
“104499” [label=“WebLogic Admitto\n104499”,group=a]  
}  
{rank=same;r1;104499}  
subgraph Database {style=filled;fillcolor=khaki3  
node [style=filled,fillcolor=khaki3]  
graph [label=“Databases”,fontsize=18]  
}  
subgraph Server {style=filled;fillcolor=lightsteelblue1  
node [style=filled,fillcolor=lightsteelblue1]  
graph [label=“Servers”,fontsize=18]  
“102260” [label=“Admittop Pool\n102260”,group=a]  
“102408” [label=“admittop1\n102408”,group=a]  
“102409” [label=“admittop2\n102409”,group=a]  
}  
{rank=same;r2;102260}  
{rank=same;r3;102408;102409}  
subgraph iService {style=filled;fillcolor=lightsteelblue2  
node [style=filled,fillcolor=lightsteelblue2]  
graph [label=“Infrastructure Services”,fontsize=18]  
}  
subgraph cm {style=filled;fillcolor=lightsteelblue  
node [style=filled,fillcolor=lightsteelblue]  
graph [label=“Configuration Management”,fontsize=18]  
}  
subgraph Appliance {style=filled;fillcolor=lightsteelblue3  
node [style=filled,fillcolor=lightsteelblue3]  
graph [label=“Appliances”,fontsize=18]  
}  
subgraph Rack {style=filled;fillcolor=lightyellow3  
node [style=filled,fillcolor=lightyellow3]  
graph [label=“Racks”,fontsize=18]  
}  
subgraph Power {style=filled;fillcolor=snow3  
node [style=filled,fillcolor=snow3]  
graph [label=“Power”,fontsize=18]  
}  
“104499” → “102260”  
“102260” → “102408”  
“102260” → “102409”  
}}  
[/dot]

Here is the code that was generated by the system:  
digraph “Admitto”{  
splines=ortho  
layout=dot  
newrank=true  
node [shape=none,fontsize=12]  
graph [label=“2024-11-07 15:09:38-0500”,labelloc=b,fontsize=7]  
subgraph clusterall {graph [label=“Admitto (Database Middleware & ERP Support (DBA)/103666)”,labelloc=t,fontsize=25,color=transparent]  
edge [penwidth=1.0,arrowsize=0.5]  
subgraph clusterranks{label=“”;margin=0  
edge [color=transparent]  
node [fontcolor=transparent,fontsize=0,width=0.01,fixedsize=true,label=“”,margin=“0,0”]  
r0 → r1 → r2 → r3}  
subgraph clusterkey { color=black  
graph [label=“Archtitectural layer color key”,fontsize=12]  
edge [color=transparent]  
node [fontsize=12]  
Servicekey [label=“Service”,style=filled,fillcolor=lightgoldenrodyellow]  
Appkey [label=“App”,style=filled,fillcolor=khaki1]  
MiddleTierkey [label=“MiddleTier”,style=filled,fillcolor=khaki2]  
Databasekey [label=“Database”,style=filled,fillcolor=khaki3]  
Serverkey [label=“Server”,style=filled,fillcolor=lightsteelblue1]  
“Infrastructure Servicekey” [label=“Infrastructure Service”,style=filled,fillcolor=lightsteelblue2]  
“Configuration Managementkey” [label=“Configuration Management”,style=filled,fillcolor=lightsteelblue]  
Appliancekey [label=“Appliance”,style=filled,fillcolor=lightsteelblue3]  
Rackkey [label=“Rack”,style=filled,fillcolor=lightyellow3]  
Powerkey [label=“Power”,style=filled,fillcolor=snow3]  
{rank=same;r0;Servicekey;Appkey;MiddleTierkey;Databasekey;Serverkey;“Infrastructure Servicekey”;“Configuration Managementkey”;Appliancekey;Rackkey;Powerkey}  
Servicekey → Appkey → MiddleTierkey → Databasekey → Serverkey → “Infrastructure Servicekey” → “Configuration Managementkey” → Appliancekey → Rackkey → Powerkey}  
subgraph Service {style=filled;fillcolor=lightgoldenrodyellow  
node [style=filled,fillcolor=lightgoldenrodyellow]  
graph [label=“Services”,fontsize=18]  
}  
subgraph App {style=filled;fillcolor=khaki1  
node [style=filled,fillcolor=khaki1]  
graph [label=“Applications”,fontsize=18]  
}  
subgraph Middle {style=filled;fillcolor=khaki2  
node [style=filled,fillcolor=khaki2]  
graph [label=“Middle Tier”,fontsize=18]  
“104499” [label=“WebLogic Admitto\n104499”,group=a]  
}  
{rank=same;r1;104499}  
subgraph Database {style=filled;fillcolor=khaki3  
node [style=filled,fillcolor=khaki3]  
graph [label=“Databases”,fontsize=18]  
}  
subgraph Server {style=filled;fillcolor=lightsteelblue1  
node [style=filled,fillcolor=lightsteelblue1]  
graph [label=“Servers”,fontsize=18]  
“102260” [label=“Admittop Pool\n102260”,group=a]  
“102408” [label=“admittop1\n102408”,group=a]  
“102409” [label=“admittop2\n102409”,group=a]  
}  
{rank=same;r2;102260}  
{rank=same;r3;102408;102409}  
subgraph iService {style=filled;fillcolor=lightsteelblue2  
node [style=filled,fillcolor=lightsteelblue2]  
graph [label=“Infrastructure Services”,fontsize=18]  
}  
subgraph cm {style=filled;fillcolor=lightsteelblue  
node [style=filled,fillcolor=lightsteelblue]  
graph [label=“Configuration Management”,fontsize=18]  
}  
subgraph Appliance {style=filled;fillcolor=lightsteelblue3  
node [style=filled,fillcolor=lightsteelblue3]  
graph [label=“Appliances”,fontsize=18]  
}  
subgraph Rack {style=filled;fillcolor=lightyellow3  
node [style=filled,fillcolor=lightyellow3]  
graph [label=“Racks”,fontsize=18]  
}  
subgraph Power {style=filled;fillcolor=snow3  
node [style=filled,fillcolor=snow3]  
graph [label=“Power”,fontsize=18]  
}  
“104499” → “102260”  
“102260” → “102408”  
“102260” → “102409”  
}}

Note how the diagram is on the left side. Most diagrams don’t do this. I noticed that if I comment out the three edges at the bottom of above code, I get this:

[dot]  
digraph “Admitto”{  
splines=ortho  
layout=dot  
newrank=true  
node [shape=none,fontsize=12]  
graph [label=“2024-11-07 15:09:38-0500”,labelloc=b,fontsize=7]  
subgraph clusterall {graph [label=“Admitto (Database Middleware & ERP Support (DBA)/103666)”,labelloc=t,fontsize=25,color=transparent]  
edge [penwidth=1.0,arrowsize=0.5]  
subgraph clusterranks{label=“”;margin=0  
edge [color=transparent]  
node [fontcolor=transparent,fontsize=0,width=0.01,fixedsize=true,label=“”,margin=“0,0”]  
r0 → r1 → r2 → r3}  
subgraph clusterkey { color=black  
graph [label=“Archtitectural layer color key”,fontsize=12]  
edge [color=transparent]  
node [fontsize=12]  
Servicekey [label=“Service”,style=filled,fillcolor=lightgoldenrodyellow]  
Appkey [label=“App”,style=filled,fillcolor=khaki1]  
MiddleTierkey [label=“MiddleTier”,style=filled,fillcolor=khaki2]  
Databasekey [label=“Database”,style=filled,fillcolor=khaki3]  
Serverkey [label=“Server”,style=filled,fillcolor=lightsteelblue1]  
“Infrastructure Servicekey” [label=“Infrastructure Service”,style=filled,fillcolor=lightsteelblue2]  
“Configuration Managementkey” [label=“Configuration Management”,style=filled,fillcolor=lightsteelblue]  
Appliancekey [label=“Appliance”,style=filled,fillcolor=lightsteelblue3]  
Rackkey [label=“Rack”,style=filled,fillcolor=lightyellow3]  
Powerkey [label=“Power”,style=filled,fillcolor=snow3]  
{rank=same;r0;Servicekey;Appkey;MiddleTierkey;Databasekey;Serverkey;“Infrastructure Servicekey”;“Configuration Managementkey”;Appliancekey;Rackkey;Powerkey}  
Servicekey → Appkey → MiddleTierkey → Databasekey → Serverkey → “Infrastructure Servicekey” → “Configuration Managementkey” → Appliancekey → Rackkey → Powerkey}  
subgraph Service {style=filled;fillcolor=lightgoldenrodyellow  
node [style=filled,fillcolor=lightgoldenrodyellow]  
graph [label=“Services”,fontsize=18]  
}  
subgraph App {style=filled;fillcolor=khaki1  
node [style=filled,fillcolor=khaki1]  
graph [label=“Applications”,fontsize=18]  
}  
subgraph Middle {style=filled;fillcolor=khaki2  
node [style=filled,fillcolor=khaki2]  
graph [label=“Middle Tier”,fontsize=18]  
“104499” [label=“WebLogic Admitto\n104499”,group=a]  
}  
{rank=same;r1;104499}  
subgraph Database {style=filled;fillcolor=khaki3  
node [style=filled,fillcolor=khaki3]  
graph [label=“Databases”,fontsize=18]  
}  
subgraph Server {style=filled;fillcolor=lightsteelblue1  
node [style=filled,fillcolor=lightsteelblue1]  
graph [label=“Servers”,fontsize=18]  
“102260” [label=“Admittop Pool\n102260”,group=a]  
“102408” [label=“admittop1\n102408”,group=a]  
“102409” [label=“admittop2\n102409”,group=a]  
}  
{rank=same;r2;102260}  
{rank=same;r3;102408;102409}  
subgraph iService {style=filled;fillcolor=lightsteelblue2  
node [style=filled,fillcolor=lightsteelblue2]  
graph [label=“Infrastructure Services”,fontsize=18]  
}  
subgraph cm {style=filled;fillcolor=lightsteelblue  
node [style=filled,fillcolor=lightsteelblue]  
graph [label=“Configuration Management”,fontsize=18]  
}  
subgraph Appliance {style=filled;fillcolor=lightsteelblue3  
node [style=filled,fillcolor=lightsteelblue3]  
graph [label=“Appliances”,fontsize=18]  
}  
subgraph Rack {style=filled;fillcolor=lightyellow3  
node [style=filled,fillcolor=lightyellow3]  
graph [label=“Racks”,fontsize=18]  
}  
subgraph Power {style=filled;fillcolor=snow3  
node [style=filled,fillcolor=snow3]  
graph [label=“Power”,fontsize=18]  
}  
#“104499” → “102260”  
#“102260” → “102408”  
#“102260” → “102409”  
}}  
[/dot]

Now the nodes have moved toward the center. Why would adding the three edges cause the graph to move to the left? This is the behavior also in the online visual editor. For development I’m running on a Linux system:  
$ dot -V  
dot - graphviz version 2.43.0 (0)

Obviously I’m not trying to specifically fix this diagram through manual manipulation since the GraphViz code is generated by the CM system, but rather, I need to understand this behavior so I can try to generate better GraphViz code.  
Thanks very much for your expertise.

---

<div class="post-metadata">

### Author: ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)
#### Post date: [November 7, 2024, 11:36pm UTC](https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533/2 "2024-11-07T23:36:34Z")

</div>

I would reverse your question to “Why are your diagrams sometimes center justified?”  
**Dot** has lots of rules about determining _rank_, but setting the _file_ (as in _rank & file_) is more challenging. Specifically, your file contains two disconnected subgraphs - the key & the _real_ graph. You have cleverly used **newrank** and **rank** attributes to position the two subgraphs, there are no explicit rules to set left-right position. (This is a common source of frustration).

Here is a modified version that eliminates **newrank** and **rank** but uses **packmode** to position and center the key above the “real” graph.

```auto
/* from https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533 */
digraph "Admitto" {
  splines=ortho
  layout=dot
// newrank=true
  packmode=array_i1 // stack unconnected clusters

  node [shape=none,fontsize=12]
  graph [label="2024-11-07 15:09:38-0500",labelloc=b,fontsize=7]
  subgraph clusterall {
    graph [label="Admitto (Database Middleware & ERP Support (DBA)/103666)",labelloc=t,fontsize=25,color=transparent]
    edge [penwidth=1.0,arrowsize=0.5]

    subgraph clusterkey {
      color=black
      graph [label="Archtitectural layer color key",fontsize=12]
      edge [color=transparent]
      node [fontsize=12]
      Servicekey [label="Service",style=filled,fillcolor=lightgoldenrodyellow]
      Appkey [label="App",style=filled,fillcolor=khaki1]
      MiddleTierkey [label="MiddleTier",style=filled,fillcolor=khaki2]
      Databasekey [label="Database",style=filled,fillcolor=khaki3]
      Serverkey [label="Server",style=filled,fillcolor=lightsteelblue1]
      "Infrastructure Servicekey" [label="Infrastructure Service",style=filled,fillcolor=lightsteelblue2]
      "Configuration Managementkey" [label="Configuration Management",style=filled,fillcolor=lightsteelblue]
      Appliancekey [label="Appliance",style=filled,fillcolor=lightsteelblue3]
      Rackkey [label="Rack",style=filled,fillcolor=lightyellow3]
      Powerkey [label="Power",style=filled,fillcolor=snow3]
      {rank=same; Servicekey; Appkey; MiddleTierkey; Databasekey; Serverkey; "Infrastructure Servicekey"; "Configuration Managementkey"; Appliancekey; Rackkey; Powerkey}
      Servicekey -> Appkey -> MiddleTierkey -> Databasekey -> Serverkey -> "Infrastructure Servicekey" -> "Configuration Managementkey" -> Appliancekey -> Rackkey -> Powerkey
    }
    subgraph iService {
      style=filled;
      fillcolor=lightsteelblue2
      node [style=filled,fillcolor=lightsteelblue2]
      graph [label="Infrastructure Services",fontsize=18]
    }
    subgraph cm {
      style=filled;
      fillcolor=lightsteelblue
      node [style=filled,fillcolor=lightsteelblue]
      graph [label="Configuration Management",fontsize=18]
    }
    subgraph Appliance {
      style=filled;
      fillcolor=lightsteelblue3
      node [style=filled,fillcolor=lightsteelblue3]
      graph [label="Appliances",fontsize=18]
    }
    subgraph Rack {
      style=filled;
      fillcolor=lightyellow3
      node [style=filled,fillcolor=lightyellow3]
      graph [label="Racks",fontsize=18]
    }
    subgraph Power {
      style=filled;
      fillcolor=snow3
      node [style=filled,fillcolor=snow3]
      graph [label="Power",fontsize=18]
    }
    node [shape=none,fontsize=12]
    subgraph Service {
      style=filled;
      fillcolor=lightgoldenrodyellow
      node [style=filled,fillcolor=lightgoldenrodyellow]
      graph [label="Services",fontsize=18]
    }
    subgraph App {
      style=filled;
      fillcolor=khaki1
      node [style=filled,fillcolor=khaki1]
      graph [label="Applications",fontsize=18]
    }
  }
  subgraph clusterXYZ123{
    label=""
    peripheries=0 // no box around this cluster
// {rank=same; r1; 104499}
    subgraph Database {
      style=filled;
      fillcolor=khaki3
      node [style=filled,fillcolor=khaki3]
      graph [label="Databases",fontsize=18]
    }
    subgraph Middle {
      style=filled;
      fillcolor=khaki2
      node [style=filled,fillcolor=khaki2]
      graph [label="Middle Tier",fontsize=18]
      "104499" [label="WebLogic Admitto\n104499",group=a]
    }
    subgraph Server {
      style=filled;
      fillcolor=lightsteelblue1
      node [style=filled,fillcolor=lightsteelblue1]
      graph [label="Servers",fontsize=18]
      "102260" [label="Admittop Pool\n102260",group=a]
      "102408" [label="admittop1\n102408",group=a]
      "102409" [label="admittop2\n102409",group=a]
    }
// {rank=same; r2; 102260}
// {rank=same; r3; 102408; 102409}
  }

  /**/
  "104499" -> "102260"
  "102260" -> "102408"
  "102260" -> "102409"
  /**/
}

```

Giving:

 ![leftSlam2](https://global.discourse-cdn.com/graphviz/original/2X/a/a60e8103f5a3db490790653cc34c076298a7972c.png)

p.s. if this were my graph, I’d consider combining the graph label and the key into one (somewhat complex) HTML table, eliminating the need for **packmode** too

---

<div class="post-metadata">

### Author: ![clutter](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@clutter](https://forum.graphviz.org/u/clutter)
#### Post date: [November 8, 2024, 4:18pm UTC](https://forum.graphviz.org/t/why-are-my-diagrams-sometimes-slammed-to-the-left/2533/3 "2024-11-08T16:18:00Z")

</div>

> [@steveroush](#):
>
> “Why are your diagrams sometimes center justified?”

That’s a good question because 95% of the time they’re centered, so in developing the general methods for the diagram format, I never gave it a second thought because they were all coming out centered. This particular format is a “backup” format in that it is not my desired format. The primary format would look like this:  
[dot]  
digraph “Admitto”{  
splines=ortho  
layout=dot  
newrank=true  
node [shape=none,fontsize=12]  
graph [label=“2024-11-07 15:09:38-0500”,labelloc=b,fontsize=7]  
subgraph clusterall {graph [label=“Admitto (Database Middleware & ERP Support (DBA)/103666)”,labelloc=t,fontsize=25,color=transparent]  
edge [penwidth=1.0,arrowsize=0.5]  
subgraph ranks{label=“”;margin=0  
edge [color=transparent]  
node [fontcolor=transparent,fontsize=0,width=0.01,fixedsize=true,label=“”,margin=“0,0”]  
r1 → r2 → r3}  
subgraph clusterService {style=filled;fillcolor=lightgoldenrodyellow  
graph [label=“Services”,fontsize=18]  
}  
subgraph clusterApp {style=filled;fillcolor=khaki1  
graph [label=“Applications”,fontsize=18]  
}  
subgraph clusterMiddle {style=filled;fillcolor=khaki2  
graph [label=“Middle Tier”,fontsize=18]  
“104499” [label=“WebLogic Admitto\n104499”,group=a]  
}  
{rank=same;r1;104499}  
subgraph clusterDatabase {style=filled;fillcolor=khaki3  
graph [label=“Databases”,fontsize=18]  
}  
subgraph clusterServer {style=filled;fillcolor=lightsteelblue1  
graph [label=“Servers”,fontsize=18]  
“102260” [label=“Admittop Pool\n102260”,group=a]  
“102408” [label=“admittop1\n102408”,group=a]  
“102409” [label=“admittop2\n102409”,group=a]  
}  
{rank=same;r2;102260}  
{rank=same;r3;102408;102409}  
subgraph clusteriService {style=filled;fillcolor=lightsteelblue2  
graph [label=“Infrastructure Services”,fontsize=18]  
}  
subgraph clustercm {style=filled;fillcolor=lightsteelblue  
graph [label=“Configuration Management”,fontsize=18]  
}  
subgraph clusterAppliance {style=filled;fillcolor=lightsteelblue3  
graph [label=“Appliances”,fontsize=18]  
}  
subgraph clusterRack {style=filled;fillcolor=lightyellow3  
graph [label=“Racks”,fontsize=18]  
}  
subgraph clusterPower {style=filled;fillcolor=snow3  
graph [label=“Power”,fontsize=18]  
}  
“104499” → “102260”  
“102260” → “102408”  
“102260” → “102409”  
}}  
[/dot]

What I discovered in testing is that on supremely complex diagrams, dot would sometimes “throw a rod” so I came up with a “simpler” layout that forgoes the separate clusters for each layer, in the hope that it removes a constraint. When this alignment problem came up, it was actually with the primary format as above. But what I discovered is that I couldn’t duplicate the problem on my laptop using a recent version of GraphViz. Unfortunately the package distribute by Redhat on the production system is dated. So somehow, something changed that somewhat fixed the issue. Some of the diagrams can be more complex, yet still centered just fine:  
[dot]  
digraph “Banner Administrative Applications”{  
splines=ortho  
layout=dot  
newrank=true  
node [shape=none,fontsize=12]  
graph [label=“2024-11-07 15:09:38-0500”,labelloc=b,fontsize=7]  
subgraph clusterall {graph [label=“Banner Administrative Applications (Database Middleware & ERP Support (DBA)/110138)”,labelloc=t,fontsize=25,color=transparent]  
edge [penwidth=1.0,arrowsize=0.5]  
subgraph ranks{label=“”;margin=0  
edge [color=transparent]  
node [fontcolor=transparent,fontsize=0,width=0.01,fixedsize=true,label=“”,margin=“0,0”]  
r1 → r2 → r3 → r4 → r5 → r6}  
subgraph clusterService {style=filled;fillcolor=lightgoldenrodyellow  
graph [label=“Services”,fontsize=18]  
}  
subgraph clusterApp {style=filled;fillcolor=khaki1  
graph [label=“Applications”,fontsize=18]  
“96037” [label=“IMAGINGAXP\n96037”,group=a]  
“96084” [label=“Clean Address\n96084”,group=a]  
“96113” [label=“Jobsub PROD\n96113”,group=a]  
“96165” [label=“Application Navigator (PROD)\n96165”,group=a]  
“96192” [label=“Banner Admin Apps (PROD)\n96192”,group=a]  
“96233” [label=“Banner Access Management (PROD)\n96233”,group=a]  
“101692” [label=“IMAGINGAXP ApplicationXtender Desktop\n101692”,group=a]  
}  
{rank=same;r1;96113;96192;96233;101692}  
{rank=same;r2;96037;96084;96165}  
subgraph clusterMiddle {style=filled;fillcolor=khaki2  
graph [label=“Middle Tier”,fontsize=18]  
“96146” [label=“Oracle Weblogic\n96146”,group=a]  
“96147” [label=“Oracle Weblogic\n96147”,group=a]  
“96185” [label=“Oracle Weblogic\n96185”,group=a]  
“96186” [label=“Oracle Weblogic\n96186”,group=a]  
}  
{rank=same;r3;96146;96147;96185;96186}  
subgraph clusterDatabase {style=filled;fillcolor=khaki3  
graph [label=“Databases”,fontsize=18]  
“96008” [label=“PROD\n96008”,group=a]  
“96038” [label=“IMAGINGDXP\n96038”,group=a]  
“96267” [label=“Oracle 19c\n96267”,group=a]  
}  
{rank=same;r4;96008;96038}  
{rank=same;r5;96267}  
subgraph clusterServer {style=filled;fillcolor=lightsteelblue1  
graph [label=“Servers”,fontsize=18]  
“101336” [label=“IMAGINGAXP\n101336”,group=a]  
“101338” [label=“IMAGINGDXP\n101338”,group=a]  
“102306” [label=“ponosp\n102306”,group=a]  
“102379” [label=“mensap\n102379”,group=a]  
“102387” [label=“vernaculusp1\n102387”,group=a]  
“102388” [label=“vernaculusp2\n102388”,group=a]  
“102392” [label=“navigop1\n102392”,group=a]  
“102393” [label=“navigop2\n102393”,group=a]  
}  
{rank=same;r6;101336;101338;102306;102379;102387;102388;102392;102393}  
subgraph clusteriService {style=filled;fillcolor=lightsteelblue2  
graph [label=“Infrastructure Services”,fontsize=18]  
}  
subgraph clustercm {style=filled;fillcolor=lightsteelblue  
graph [label=“Configuration Management”,fontsize=18]  
}  
subgraph clusterAppliance {style=filled;fillcolor=lightsteelblue3  
graph [label=“Appliances”,fontsize=18]  
}  
subgraph clusterRack {style=filled;fillcolor=lightyellow3  
graph [label=“Racks”,fontsize=18]  
}  
subgraph clusterPower {style=filled;fillcolor=snow3  
graph [label=“Power”,fontsize=18]  
}  
“96192” → “96186”  
“101692” → “96037”  
“96146” → “96008”  
“96165” → “96146”  
“96165” → “96147”  
“96147” → “96008”  
“96084” → “102306”  
“96037” → “96008”  
“96192” → “96084”  
“96186” → “96008”  
“96084” → “96008”  
“96038” → “101338”  
“96037” → “96038”  
“96233” → “96185”  
“96186” → “102388”  
“96185” → “96008”  
“96038” → “96037”  
“96267” → “102379”  
“96233” → “96186”  
“96037” → “101336”  
“96192” → “96165”  
“96185” → “102387”  
“96146” → “102392”  
“96192” → “96185”  
“96147” → “102393”  
“96113” → “96008”  
“96008” → “96267”  
}}  
[/dot]

So I can’t explain why it’s centered, but that seems to be the norm for my layout.  
I have not used **packmode** before so I shall start digging into it to see if it is a better general solution. Since the system implements a general solution for any potential diagram someone comes up with, I did a lot of testing on complex graphs to see if I could break it. But of course, production is always the acid test 🙂  
Thank you very much for the suggestion and I’m going to start looking into it.
