Using a set of eigenvectors of matrices associated with a graph as coordinates

layout_with_eigen(g, type = "laplacian", ev = "smallest") layout_igraph_eigen(g, type = "laplacian", ev = "smallest", circular)

g | igraph object |
---|---|

type | matrix to be used for spectral decomposition. either 'adjacency' or 'laplacian' |

ev | eigenvectors to be used. Either 'smallest' or 'largest'. |

circular | not used |

matrix of xy coordinates

The layout_igraph_* function should not be used directly. It is only used as an argument for plotting with 'igraph'. 'ggraph' natively supports the layout.

library(igraph) g <- sample_gnp(50,0.2) xy <- layout_with_eigen(g,type = "adjacency",ev = "largest") xy <- layout_with_eigen(g,type = "adjacency",ev = "smallest") xy <- layout_with_eigen(g,type = "laplacian",ev = "largest") xy <- layout_with_eigen(g,type = "laplacian",ev = "smallest")