# Order in rank subgraph

**URL:** <https://forum.graphviz.org/t/order-in-rank-subgraph/452>\
**Category:** Help\
**Created:** [November 23, 2020, 9:32am UTC](https://forum.graphviz.org/t/order-in-rank-subgraph/452 "2020-11-23T09:32:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KULINAR847](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@KULINAR847](https://forum.graphviz.org/u/KULINAR847)\
**Post date:** [November 23, 2020, 9:32am UTC](https://forum.graphviz.org/t/order-in-rank-subgraph/452/1 "2020-11-23T09:32:22Z")

</div>

I have a tree family graph that is being imported in svg format. But there is one feature in the display. Some nodes are located between two connected nodes, as shown in the figure. How can this be corrected?

 ![question](https://global.discourse-cdn.com/graphviz/original/1X/984538aa97f240a8d4cc7407d21f68f6d3f33746.png)  
Link to my graphviz files: [https://drive.google.com/drive/folders/1ax7gPXvNneFCTkgnduE9GsPycgMMSb\_j?usp=sharing](https://drive.google.com/drive/folders/1ax7gPXvNneFCTkgnduE9GsPycgMMSb_j?usp=sharing)

---

<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 23, 2020, 11:45pm UTC](https://forum.graphviz.org/t/order-in-rank-subgraph/452/2 "2020-11-23T23:45:35Z")

</div>

Here are two ways to try to get nodes rearranged more to your liking:

- add invisible edges between nodes you want to be adjacent
- add **weight** attributes to existing edges to “loosen” them or “tighten” them

---

<div class="post-metadata">

**Author:** ![schmoo2k](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/schmoo2k/32/29_2.png) [@schmoo2k](https://forum.graphviz.org/u/schmoo2k)\
**Post date:** [November 25, 2020, 7:59am UTC](https://forum.graphviz.org/t/order-in-rank-subgraph/452/3 "2020-11-25T07:59:19Z")

</div>

Unrelated - but I was coincidentally trying to do a family tree with known DNA connections (dotted lines): [Church / Gordon Smith | Observable](https://observablehq.com/@gordonsmith/church)

---

<div class="post-metadata">

**Author:** ![KULINAR847](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@KULINAR847](https://forum.graphviz.org/u/KULINAR847)\
**Post date:** [November 25, 2020, 12:56pm UTC](https://forum.graphviz.org/t/order-in-rank-subgraph/452/4 "2020-11-25T12:56:28Z")

</div>

Cool graph! I wanted to make connections as well, but I didn’t know how.
