Plot Complementary Cumulative Degree Distribution (CCDF)
plot_CCDF.Rd
This function plots the complementary cumulative distribution function (CCDF) of node degrees in a network and optionally overlays power-law reference curves.
Arguments
- graph
An
igraph
object representing the network to analyze or a data frame containing a symbolic edge list in the first two columns. Additional columns are considered as edge attributes.- keep_direction
Logical. Only for directed graphs. If
TRUE
, CCDF curves are drawn for 'in'-dgree, 'out'-degree, and 'all'-degree distributions.FALSE
to ignore directionality.- remove_singles
Logical. If
TRUE
, nodes with degree 0 are removed from the graph before computing the CCDF. Default isFALSE
.- show_PL
Logical. If
TRUE
, overlays theoretical power-law reference lines of the form \(P(K > k) \sim k^{-\gamma}\). Default isTRUE
.- PL_exponents
Numeric vector. The \(\gamma\) exponents for the power-law curves. Default is
c(2, 3)
.- colors
Optional character vector. Custom colors for the graph curve and power-law lines. If
NULL
, default colors are used.- label.size
Numeric. Font size for axis labels and theme. Passed to
theme_minimal
.