# Equal spacing of records in graphviz

**URL:** <https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105>\
**Category:** Help\
**Created:** [May 16, 2020, 2:39pm UTC](https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105 "2020-05-16T14:39:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helix](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Helix](https://forum.graphviz.org/u/Helix)\
**Post date:** [May 16, 2020, 2:39pm UTC](https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105/1 "2020-05-16T14:39:55Z")

</div>

Hello everyone,  
I would like to ask if there is a way to create equal spacing inside the nodes. As you can see the boxes in the nodes have different size and I would like them to be equal, so that the arrow always points to the seperating border between them (sorry, I have no idea how to explain this in english).

 ![graphviz](https://global.discourse-cdn.com/graphviz/original/1X/c2aa131e3812ccbcf6dfd389d6c1242f41af641a.png)

code:

```auto
digraph G {
         bgcolor = grey;
         node [shape=Mrecord, width="2"];
      ply1 [label="<f1>1.d4|<f2> 0.24"];
      ply2 [label="<f1>1...&#9816;f6|<2> 0.24"];
      ply3 [label="<f1>2.c4|<f2> 0.24"];
      ply4 [label="<f1>2...g6|<f2> 0.24"];
      ply5 [label="<f1>3.f3|<f2> 0.24"];
      ply6 [label="<f1>3...&#9816;c6!?|<f2> 0.24"];
      ply7 [label="<f1>4.d5|<f2> 0.24"];
      ply1 -> ply2;
      ply2 -> ply3;
      ply3 -> ply4;
      ply4 -> ply5;
      ply5 -> ply6;
      ply6 -> ply7;

    }

```

---

<div class="post-metadata">

**Author:** ![erg](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/erg/32/34_2.png) [@erg](https://forum.graphviz.org/u/erg)\
**Post date:** [May 16, 2020, 8:27pm UTC](https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105/2 "2020-05-16T20:27:39Z")

</div>

You can get what you want but not with record nodes. You need to use [HTML-like labels](https://graphviz.gitlab.io/_pages/doc/info/shapes.html#html). Start your graph with

```auto
digraph G {
  bgcolor = grey;
  node [shape=none, margin=0, height=0];

```

and rewrite `ply1` as

```auto
  ply1 [label=<<table style="rounded"><tr>
        <td width="72" fixedsize="true" height="25" border="0">1.d4</td><vr/>
        <td width="72" fixedsize="true" height="25" border="0">0.24</td>
        </tr></table>>];

```

making the corresponding changes to the rest of the nodes.

Though more verbose, HTML-like labels should, in general, be used instead of record shapes.

---

<div class="post-metadata">

**Author:** ![Helix](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Helix](https://forum.graphviz.org/u/Helix)\
**Post date:** [May 17, 2020, 7:06am UTC](https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105/3 "2020-05-17T07:06:04Z")

</div>

Hello erg,  
thanks for the fast reply. It works perfectly fine.  
If you don’t mind I would like to ask something else.

Is there a way to fill the outer ring a double circle with color around (alternatively if I use peripheries around a node)?

---

<div class="post-metadata">

**Author:** ![Ellson](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/ellson/32/19_2.png) [@Ellson](https://forum.graphviz.org/u/Ellson)\
**Post date:** [May 17, 2020, 9:57pm UTC](https://forum.graphviz.org/t/equal-spacing-of-records-in-graphviz/105/4 "2020-05-17T21:57:41Z")

</div>

> Is there a way to fill the outer ring a double circle with color around  
> (alternatively if I use peripheries around a node)?

Not currently. This might be a cool project for someone. Perhaps peripheries could be given a colorList as an alternative to an integer. e.g peripheries=“red:blue”
