# Can Depth Be Ignored?

**URL:** <https://forum.graphviz.org/t/can-depth-be-ignored/1838>\
**Category:** Uncategorized\
**Created:** [October 19, 2023, 5:41pm UTC](https://forum.graphviz.org/t/can-depth-be-ignored/1838 "2023-10-19T17:41:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaltryProgrammer](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@PaltryProgrammer](https://forum.graphviz.org/u/PaltryProgrammer)\
**Post date:** [October 19, 2023, 5:41pm UTC](https://forum.graphviz.org/t/can-depth-be-ignored/1838/1 "2023-10-19T17:41:17Z")

</div>

![undo-redo_tree_0x0040](https://global.discourse-cdn.com/graphviz/original/2X/5/59917ae4772906a0969d7225bc8a5e528b2e1d71.gif)  
greetings kind regards  
please see in attached image lengthy links for purpose of maintaining consistent depth . may i please inquire does means exist to specify such does not occur but instead shortest link length which is visually useful .

thank you kindly

---

<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:** [October 20, 2023, 1:11am UTC](https://forum.graphviz.org/t/can-depth-be-ignored/1838/2 "2023-10-20T01:11:03Z")

</div>

Sort answer: no, there is no attribute that stops dot from aligning ranks.  
Long answer: there are several possible solutions to this problem. In no particular order:

- Try the other layout engines. Each will provide a different look - maybe you’ll see one that pleases you. Note that **neato** and **fdp** have multiple tuning attributes that can make quite a difference.
- Replace your large monolithic nodes with multiple smaller nodes, possibly within a cluster.
- Replace your two-line text (“insert\_ptr…\ninsert…” with a single, longer line (remove the ‘\n’)
- Try using the **TBbalance** attribute ([TBbalance | Graphviz](https://graphviz.org/docs/attrs/TBbalance/)) to shift nodes “up” or “down” (towards the **min** or **max** rank)
- Change **rankdir** to **LR** - and then force all the nodes into the original downward arrangement. This _will_ allow you to achieve your goal, but you have to entirely re-think the graph. All the vertical sets of nodes are now on the same rank. This really works, but I find it hard to wrap my brain-cells around.

---

<div class="post-metadata">

**Author:** ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)\
**Post date:** [October 20, 2023, 1:16pm UTC](https://forum.graphviz.org/t/can-depth-be-ignored/1838/3 "2023-10-20T13:16:02Z")

</div>

An alternative to dot might be `neato -Gmode=hier`
