cplot {netmodels}R Documentation

Plots the comparative cumulative fraction distribution of two degree distributions

Description

Plots the comparative cumulative fraction plot of two distributions. This function is designed to compare the observed degree distribution with the predicted one, providing a visual tool to support the results of the KS Test.

Usage

cplot(obj1, obj2, main = "Comparative cumulative fraction plot of the degree distribution", type = "s", xlab = "X", ylab = "", color1 = "blue", color2 = "red", sub="", log="x", filename = NULL, ...)

Arguments

obj1 Could be a igraph network object or the degree distribution of the network, represents the 1st Degree distribution to plot (ie. observed)
obj2 Could be a igraph network object or the degree distribution of the network, represents the 2st Degree distribution to plot (ie. predicted)
main Title of the output graphic, default = "Degree Distribution"
type R graphic parameter for the plot style, default = "p" (points)
xlab X-Axis name, default = "Node"
ylab Y-Axis name, default = "Degree"
color1 Plot color of the 1st distribution, default = "blue"
color2 Plot color of the 2nd distribution, default = "red"
sub
log Axis log scaling, default="x"
filename Filename of the pdf output file (optional), default = NULL
... Additional arguments used by the standard function plot

Details

Value

Note

Author(s)

Domingo Vargas

References

See Also

Generic R plot function: plot

Examples


library(igraph)
data(test.net, package="netmodels")
dist1 <- degree(test.net)
alpha <- calc.alpha(dist1)
dist2 <- dist.power.law(alpha,length(dist1))
cplot(dist1/sum(dist1),dist2)


[Package netmodels version 0.1 Index]