# Layout in social network analysis

**URL:** https://igraph.discourse.group/t/layout-in-social-network-analysis/1225
**Category:** Usage
**Tags:** R
**Created:** [21 May 2022 18:51 UTC](https://igraph.discourse.group/t/layout-in-social-network-analysis/1225 "2022-05-21T18:51:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Varlant1n](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/varlant1n/32/762_2.png) [@Varlant1n](https://igraph.discourse.group/u/Varlant1n)
#### Post date: [21 May 2022 18:51 UTC](https://igraph.discourse.group/t/layout-in-social-network-analysis/1225/1 "2022-05-21T18:51:05Z")

</div>

I built a social network from the date obtained from un comtrade for crude oil. My code and the result:

```auto
plot(network, edge.width=E(network)$importance, layout=layout_, vertex.color = "red", edge.color = "red", vertex.frame.color = "red", vertex.size = as.numeric(V(network)$vertex.size), vertex.label.cex=as.numeric(V(network)$vertex.label.cex))

```

 ![image](https://global.discourse-cdn.com/free1/uploads/igraph/original/1X/54cecb0f5ea72dc75493fe47a895a41f40e25ba9.jpeg)

I want to bring my result to this state. As you can see in the picture, all the dots are equally spaced apart. I use “layout.sphere”, but in this case all the dots are at different distances from each other. But I insanely need a result like in the picture below:

 ![image](https://global.discourse-cdn.com/free1/uploads/igraph/original/1X/ad0a056caf45e2f7162d3414a1ba55744211bbf4.jpeg)

---

<div class="post-metadata">

### Author: ![Varlant1n](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/varlant1n/32/762_2.png) [@Varlant1n](https://igraph.discourse.group/u/Varlant1n)
#### Post date: [21 May 2022 23:42 UTC](https://igraph.discourse.group/t/layout-in-social-network-analysis/1225/2 "2022-05-21T23:42:33Z")

</div>

Guys, really need help with this. Stuck on this point, I need each country to be at the same distance from each other so there is no overlap.

---

<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: [23 May 2022 07:29 UTC](https://igraph.discourse.group/t/layout-in-social-network-analysis/1225/3 "2022-05-23T07:29:46Z")

</div>

You would probably want to explore other layout functions, such as [`layout_with_kk`](https://igraph.org/r/html/latest/layout_with_kk.html) and [`layout_with_fr`](https://igraph.org/r/html/latest/layout_with_fr.html). It looks like you have a rather densely connected network with quite some differences in edge weights, so probably you also want to pass in the edge weights.
