EVOLUTION-MANAGER
Edit File: layout_with_fr.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: The Fruchterman-Reingold layout algorithm</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for layout_with_fr {igraph}"><tr><td>layout_with_fr {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Fruchterman-Reingold layout algorithm</h2> <h3>Description</h3> <p>Place vertices on the plane using the force-directed layout algorithm by Fruchterman and Reingold. </p> <h3>Usage</h3> <pre> layout_with_fr( graph, coords = NULL, dim = 2, niter = 500, start.temp = sqrt(vcount(graph)), grid = c("auto", "grid", "nogrid"), weights = NULL, minx = NULL, maxx = NULL, miny = NULL, maxy = NULL, minz = NULL, maxz = NULL, coolexp, maxdelta, area, repulserad, maxiter ) with_fr(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to lay out. Edge directions are ignored.</p> </td></tr> <tr valign="top"><td><code>coords</code></td> <td> <p>Optional starting positions for the vertices. If this argument is not <code>NULL</code> then it should be an appropriate matrix of starting coordinates.</p> </td></tr> <tr valign="top"><td><code>dim</code></td> <td> <p>Integer scalar, 2 or 3, the dimension of the layout. Two dimensional layouts are places on a plane, three dimensional ones in the 3d space.</p> </td></tr> <tr valign="top"><td><code>niter</code></td> <td> <p>Integer scalar, the number of iterations to perform.</p> </td></tr> <tr valign="top"><td><code>start.temp</code></td> <td> <p>Real scalar, the start temperature. This is the maximum amount of movement alloved along one axis, within one step, for a vertex. Currently it is decreased linearly to zero during the iteration.</p> </td></tr> <tr valign="top"><td><code>grid</code></td> <td> <p>Character scalar, whether to use the faster, but less accurate grid based implementation of the algorithm. By default (“auto”), the grid-based implementation is used if the graph has more than one thousand vertices.</p> </td></tr> <tr valign="top"><td><code>weights</code></td> <td> <p>A vector giving edge weights. The <code>weight</code> edge attribute is used by default, if present. If weights are given, then the attraction along the edges will be multiplied by the given edge weights. This places vertices connected with a highly weighted edge closer to each other. Weights must be positive.</p> </td></tr> <tr valign="top"><td><code>minx</code></td> <td> <p>If not <code>NULL</code>, then it must be a numeric vector that gives lower boundaries for the ‘x’ coordinates of the vertices. The length of the vector must match the number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>maxx</code></td> <td> <p>Similar to <code>minx</code>, but gives the upper boundaries.</p> </td></tr> <tr valign="top"><td><code>miny</code></td> <td> <p>Similar to <code>minx</code>, but gives the lower boundaries of the ‘y’ coordinates.</p> </td></tr> <tr valign="top"><td><code>maxy</code></td> <td> <p>Similar to <code>minx</code>, but gives the upper boundaries of the ‘y’ coordinates.</p> </td></tr> <tr valign="top"><td><code>minz</code></td> <td> <p>Similar to <code>minx</code>, but gives the lower boundaries of the ‘z’ coordinates.</p> </td></tr> <tr valign="top"><td><code>maxz</code></td> <td> <p>Similar to <code>minx</code>, but gives the upper boundaries of the ‘z’ coordinates.</p> </td></tr> <tr valign="top"><td><code>coolexp, maxdelta, area, repulserad</code></td> <td> <p>These arguments are not supported from igraph version 0.8.0 and are ignored (with a warning).</p> </td></tr> <tr valign="top"><td><code>maxiter</code></td> <td> <p>A deprecated synonym of <code>niter</code>, for compatibility.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>layout_with_fr</code>.</p> </td></tr> </table> <h3>Details</h3> <p>See the referenced paper below for the details of the algorithm. </p> <p>This function was rewritten from scratch in igraph version 0.8.0. </p> <h3>Value</h3> <p>A two- or three-column matrix, each row giving the coordinates of a vertex, according to the ids of the vertex ids. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Fruchterman, T.M.J. and Reingold, E.M. (1991). Graph Drawing by Force-directed Placement. <em>Software - Practice and Experience</em>, 21(11):1129-1164. </p> <h3>See Also</h3> <p><code><a href="layout_with_drl.html">layout_with_drl</a></code>, <code><a href="layout_with_kk.html">layout_with_kk</a></code> for other layout algorithms. </p> <p>Other graph layouts: <code><a href="add_layout_.html">add_layout_</a>()</code>, <code><a href="component_wise.html">component_wise</a>()</code>, <code><a href="layout_as_bipartite.html">layout_as_bipartite</a>()</code>, <code><a href="layout_as_star.html">layout_as_star</a>()</code>, <code><a href="layout_as_tree.html">layout_as_tree</a>()</code>, <code><a href="layout_in_circle.html">layout_in_circle</a>()</code>, <code><a href="layout_nicely.html">layout_nicely</a>()</code>, <code><a href="layout_on_grid.html">layout_on_grid</a>()</code>, <code><a href="layout_on_sphere.html">layout_on_sphere</a>()</code>, <code><a href="layout_randomly.html">layout_randomly</a>()</code>, <code><a href="layout_with_dh.html">layout_with_dh</a>()</code>, <code><a href="layout_with_gem.html">layout_with_gem</a>()</code>, <code><a href="layout_with_graphopt.html">layout_with_graphopt</a>()</code>, <code><a href="layout_with_kk.html">layout_with_kk</a>()</code>, <code><a href="layout_with_lgl.html">layout_with_lgl</a>()</code>, <code><a href="layout_with_mds.html">layout_with_mds</a>()</code>, <code><a href="layout_with_sugiyama.html">layout_with_sugiyama</a>()</code>, <code><a href="layout_.html">layout_</a>()</code>, <code><a href="merge_coords.html">merge_coords</a>()</code>, <code><a href="norm_coords.html">norm_coords</a>()</code>, <code><a href="normalize.html">normalize</a>()</code> </p> <h3>Examples</h3> <pre> # Fixing ego g <- sample_pa(20, m=2) minC <- rep(-Inf, vcount(g)) maxC <- rep(Inf, vcount(g)) minC[1] <- maxC[1] <- 0 co <- layout_with_fr(g, minx=minC, maxx=maxC, miny=minC, maxy=maxC) co[1,] plot(g, layout=co, vertex.size=30, edge.arrow.size=0.2, vertex.label=c("ego", rep("", vcount(g)-1)), rescale=FALSE, xlim=range(co[,1]), ylim=range(co[,2]), vertex.label.dist=0, vertex.label.color="red") axis(1) axis(2) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>