我在igraph中创建了有向图,
ba_game_graph <- sample_pa(10000, power = 1, m = NULL, out.dist = NULL, out.seq = NULL,
out.pref = FALSE, zero.appeal = 1, directed = TRUE,
algorithm = c("psumtree"), start.graph = NULL)
得到学位分布
ba_game_deg_dist_tot <- degree_distribution(ba_game_graph, cumulative = FALSE, mode = c("total"))
符合幂律
ba_game_plaw <- fit_power_law(ba_game_deg_dist_tot, implementation = c("plfit"), force.continuous = FALSE)
现在我想绘制度分布的直方图和它上面的幂律曲线。我该怎么做?
hist(ba_game_deg_dist_tot, pch=20, breaks=25, prob=TRUE, main="")