疎なグラフ

g1 <- erdos.renyi.game(1000, 1/1000)
sh.m <- shortest.paths(g1)
sh.m
sorted.sh.m <- apply(sh.m,1,sort)
matplot(t(sorted.sh.m),type="l")