title: Setting the order of circle layout to decreasing changes the nodes position in the igraph network
body: <p>I create the circle network below with the left direction. The node <code>&quot;Robert Zero&quot;</code> is always set to be on top. The nummber of nodes may fiffer every time so I must get a generic solution.This happens with this code:</p>
  <pre><code>library('igraph')
  id &lt;- c(&quot;Steve Sweet&quot;,  &quot;Tom Thompson&quot;, &quot;Roger Rabbit&quot;, &quot;Robert Zero&quot; )
  label &lt;- c(&quot;Steve Sweet&quot;,  &quot;Tom Thompson&quot;, &quot;Roger Rabbit&quot;, &quot;Robert Zero&quot; )
  color&lt;-c(&quot;gray&quot;,   &quot;gray&quot;,   &quot;gray&quot;,   &quot;yellow&quot;)
  nodes &lt;- data.frame(id,label,color)
  
  from &lt;- c(&quot;Steve Sweet&quot;,  &quot;Tom Thompson&quot;, &quot;Roger Rabbit&quot;, &quot;Robert Zero&quot; )
  to &lt;- c(&quot;Tom Thompson&quot;, &quot;Roger Rabbit&quot;, &quot;Robert Zero&quot;,  &quot;Steve Sweet&quot;)
  group&lt;-c(&quot;Residential Mortgage&quot;, &quot;Real Estate Law&quot;,&quot;Divorce Attorney&quot;,&quot;Personal Injury Law&quot; )
  width&lt;-c(4.00, 1.00, 3.00, 0.01)
  color&lt;-c(&quot;cyan&quot;, &quot;cyan&quot;, &quot;cyan&quot;, &quot;cyan&quot;)
  lty&lt;-c(&quot;solid&quot;,  &quot;solid&quot;,  &quot;solid&quot;,  &quot;dashed&quot;)
  label&lt;-c(NA,NA,NA,&quot;bridge&quot;)
  
  edges &lt;- data.frame(from,to,group,width,color,lty,label)
  
  #Bringing the to name in this case main_name in the 1st row of nodes dataframe
  nodes&lt;-nodes[order(nodes$id != &quot;Robert Zero&quot;),]
  
  #creating the graph object of nodes and edges simple paths
  gph2 &lt;- graph_from_data_frame(edges, directed=TRUE, vertices=nodes)
  
  rot &lt;- function(mat, mx = which.max(mat[, 2])) {
    if (mx == 1) mat else mat[c(mx:nrow(mat), 1:(mx-1)), ]
  }
  #plot every network
  plot(gph2, layout = rot(layout_in_circle(gph2)))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/WrkLU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WrkLU.png" alt="enter image description here" /></a></p>
  <p>But then I want to turn the direction of my network to clockwise (right) direction using <code>igraph</code> with this</p>
  <pre><code>plot(gph2, layout = rot(layout_in_circle(gph2, order = order(from,decreasing = T))))
  </code></pre>
  <p>but then I get this network with edges that cross each other while I want them to create a network like the above but with opposite direction:</p>
  <p><a href="https://i.stack.imgur.com/zyd3W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zyd3W.png" alt="enter image description here" /></a></p>