# Staggering layout to avoid overlapping labels

**URL:** <https://igraph.discourse.group/t/staggering-layout-to-avoid-overlapping-labels/581>\
**Category:** Usage\
**Tags:** Python\
**Created:** [10 January 2021 10:58 UTC](https://igraph.discourse.group/t/staggering-layout-to-avoid-overlapping-labels/581 "2021-01-10T10:58:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjalex](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/rjalex/32/431_2.png) [@rjalex](https://igraph.discourse.group/u/rjalex)\
**Post date:** [10 January 2021 10:58 UTC](https://igraph.discourse.group/t/staggering-layout-to-avoid-overlapping-labels/581/1 "2021-01-10T10:58:04Z")

</div>

With the following code:

> layout = g.layout\_reingold\_tilford()  
> ig.plot(g, “company.png”, layout=layout, bbox=(3000, 3000))  
> I obtain something like the following:
> 
> ![company](https://global.discourse-cdn.com/free1/uploads/igraph/original/1X/bfc324275524a462b8f3dd50a3bf3f285a3500d0.jpeg)  
> Is there a way to take the labels (people names) into account to stagger the vertices so they (mostly) do not overlap?  
> Thanks

---

<div class="post-metadata">

**Author:** ![vtraag](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/vtraag/32/38_2.png) [@vtraag](https://igraph.discourse.group/u/vtraag)\
**Post date:** [12 January 2021 13:47 UTC](https://igraph.discourse.group/t/staggering-layout-to-avoid-overlapping-labels/581/2 "2021-01-12T13:47:35Z")

</div>

This is not so easy I believe.

Instead, I would suggest to rotate the layout (use [`layout.rotate`](https://igraph.org/python/doc/igraph.layout.Layout-class.html#rotate)), so that it is drawn horizontally. That way, you should be able to make sense of each label much more easily.

---

<div class="post-metadata">

**Author:** ![rjalex](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/rjalex/32/431_2.png) [@rjalex](https://igraph.discourse.group/u/rjalex)\
**Post date:** [12 January 2021 15:44 UTC](https://igraph.discourse.group/t/staggering-layout-to-avoid-overlapping-labels/581/3 "2021-01-12T15:44:10Z")

</div>

Thanks you very much @vtraag !!!

This is a good idea.

What I’d really need also is to find a way to force more distance between the vertex centers, but not managing so far …

Take care.
