# Parallel timelines layout

**URL:** <https://forum.graphviz.org/t/parallel-timelines-layout/544>\
**Category:** Help\
**Created:** [February 14, 2021, 3:26am UTC](https://forum.graphviz.org/t/parallel-timelines-layout/544 "2021-02-14T03:26:47Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [February 15, 2021, 6:07pm UTC](https://forum.graphviz.org/t/parallel-timelines-layout/544/8 "2021-02-15T18:07:49Z")

</div>

Your goal was to make a set of nodes (and edges) strictly vertical. A common goal.  
But to my knowledge, the only way to guarantee node alignment to be vertical (or more commonly horizontal) is to include the nodes in a subgroup that has the rank=same attribute, like so:  
`{ rank=same a b c d e }`  
(fyi, I tried this on your smaller graph with `rankdir=LR,` but the resulting graph was not “right” - the sequence of nodes was confusing). You really seem to want, `{file=same a b c d e}` - but Graphviz does not support this concept. ( **file** - as in **rank and file** - is equivalent to **column=same** )

Anyway, I don’t think **group** guarantees anything other than an effort to prevent multi-line or splined edges. i.e. I believe that diagonal lines (edges) are OK. Not what you want.  
Here is more info on the group attribute: [A question about the GROUP attribute: what does STRAIGHT mean? - #2 by erg](https://forum.graphviz.org/t/a-question-about-the-group-attribute-what-does-straight-mean/548/2)

To be complete, using clusters does not guarantee vertical/horizontal alignment. But it works in this case.

Others have also asked for vertical (file) alignment capability. Unfortunately, **dot** does not provide it.

**Dot** ignores positions ( **pos** attribute) as input. You can edit them (to anything legal) and they will have no impact. ( **Neato -n** and **gvpr** are the only programs that use position values).  
Here is a command line that is more direct:  
`gvpr -c -f group2cluster.gvpr yourfile.gv |dot -Tsvg >yourfile.svg` \<\< or any output format, like png

---

_[View the full topic](https://forum.graphviz.org/t/parallel-timelines-layout/544)._
