Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use the <code>minx</code>, <code>maxx</code>, <code>miny</code> and <code>maxy</code> arguments of <code>layout.fruchterman.reingold()</code> or <code>layout.kamada.kawai()</code> to fix some vertices completely. These arguments specify vertex-specific lower and/or upper limits for the coordinates. </p> <p>For the vertices you want to fix, set them exactly to the value to fix, and for the other vertices set <code>minx</code> to some small negative values (<code>-Inf</code> might work, too), and set <code>maxx</code> to some large value, (again, maybe <code>Inf</code> works, too).</p> <p>You might need to use the <code>rescale=FALSE</code> argument in <code>plot.igraph()</code> to avoid rescaling the complete layout, for both the first and second graph.</p> <h3>Edit:</h3> <p>From the manual:</p> <blockquote> <p>'<code>minx</code>' If not '<code>NULL</code>', then it must be a numeric vector that gives lower boundaries for the '<code>x</code>' coordinates of the vertices. The length of the vector must match the number of vertices in the graph.</p> <p>'<code>maxx</code>' Similar to '<code>minx</code>', but gives the upper boundaries.</p> </blockquote> <p>For example:</p> <pre><code>g &lt;- graph.star(10, center=1) minx &lt;- rep(-Inf, vcount(g)) maxx &lt;- rep( Inf, vcount(g)) minx[1] &lt;- 0 maxx[1] &lt;- 0 lay &lt;- layout.fruchterman.reingold(g, minx=minx, maxx=maxx, miny=minx, maxy=maxx) plot(g, layout=lay) </code></pre> <p>fixes the first vertex into (0,0) (might be modified by rescaling, to avoid rescaling, use <code>rescale=FALSE</code> in <code>plot()</code> and set the plotting limits).</p> <p><img src="https://i.stack.imgur.com/yW8hN.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload