plot.PAFit_net: Plot a 'PAFit_net' object

Description Usage Arguments Value Author(s) Examples

View source: R/plot.PAFit_net.R

Description

This function plots a PAFit_net object. There are four options of plot to specify the type of plot.

The first two concern plotting the graph in $graph of the PAFit_net object. Option plot = "graph" plots the graph, while plot = "degree" plots the degree distribution. Option slice allows selection of the time-step at which the temporal graph is plotted.

The last two options concern plotting the PA function and node fitnesses (if they are not NULL).

Usage

1
2
3
4
5
## S3 method for class 'PAFit_net'
plot(x,
     plot = "graph"                         ,
     slice = length(unique(x$graph[,3])) - 1,
     ...)

Arguments

x

An object of class PAFit_net.

plot

String. Possible values are "graph", "degree", "PA", and "fit". Default value is "graph".

slice

Integer. Ignored when plot is not "graph" or "degree". Specifies the time-step at which the graph is plotted. Default value is the final time-step.

...

Value

Outputs the desired plot.

Author(s)

Thong Pham thongphamthe@gmail.com. When plot = "graph", the function uses plot.network.default in the network package.

Examples

1
2
3
4
5
6
7
    library("PAFit")
    # a network from Bianconi-Barabasi model
    net        <- generate_BB(N = 50 , m = 10 , s = 10)
    plot(net, plot = "graph")
    plot(net, plot = "degree")
    plot(net, plot = "PA")
    plot(net, plot = "fit")

PAFit documentation built on Jan. 18, 2022, 1:10 a.m.