Description Usage Arguments Value Author(s) Examples
View source: R/plot_power_laws.R
Given a vector of discrete or continuous values, it fits a power law distribution to the data and plots the CDF in log-log scale.
1 | plot_pl_cdf(x, ticks_x = 5, ticks_y = 5, xlab = "x", ylab = "P(X >= x)")
|
x |
numeric; A vector of discrete or continuous values. |
ticks_x |
integer; Number of ticks in the x axis. |
ticks_y |
integer; Number of ticks in the y axis. |
xlab |
character; Label for the x axis. |
ylab |
character; Label for the y axis. |
A ggplot object with the plot.
Gregorio Alanis-Lobato galanisl@uni-mainz.de
1 2 3 | # Use log-binning to plot CDFs for the generated power law distributions
p_disc <- plot_pl_cdf(rnd_disc_pl(10000, 2, 2.3))
p_cont <- plot_pl_cdf(rnd_cont_pl(10000, 2, 2.3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.