# NOT RUN {
library(igraph)
library(ggraph)
set.seed(665)
g <- sample_pa(100,1,1,directed = FALSE)
#calculate layout manualy
xy <- layout_with_stress(g)
#use it with ggraph
ggraph(g,layout="stress")+
geom_edge_link(width=0.2,colour="grey")+
geom_node_point(col="black",size=0.3)+
theme_graph()
# }
Run the code above in your browser using DataLab