# NOT RUN {
library(igraph)
library(ggraph)
g <- sample_gnp(50,0.2)
ggraph(g,layout="eigen",type="adjacency",ev="largest")+
geom_edge_link(n=2,edge_colour="grey66")+
geom_node_point(shape=21,fill="grey25",size=5)+
theme_graph()
ggraph(g,layout="eigen",type="adjacency",ev="smallest")+
geom_edge_link(n=2,edge_colour="grey66")+
geom_node_point(shape=21,fill="grey25",size=5)+
theme_graph()
ggraph(g,layout="eigen",type="laplacian",ev="largest")+
geom_edge_link(n=2,edge_colour="grey66")+
geom_node_point(shape=21,fill="grey25",size=5)+
theme_graph()
ggraph(g,layout="eigen",type="laplacian",ev="smallest")+
geom_edge_link(n=2,edge_colour="grey66")+
geom_node_point(shape=21,fill="grey25",size=5)+
theme_graph()
# }
Run the code above in your browser using DataLab