Snippets

Dénes Türei good Fruchterman-Reingold layout parameters

Created by Dénes Türei
require(qgraph)

make_fr_layout <- function(g){
    # layout with qgraph
    # g is an igraph object
    el <- get.edgelist(g, names = FALSE)
    lo <- qgraph.layout.fruchtermanreingold(el, vcount = vcount(g),
                                            area = vcount(g)^2.3,
                                            repulse.rad = vcount(g)^2.1,
                                            niter = 3000)
    return(lo)
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.