Learn R Programming

PAFit (version 1.2.10)

plot.PAFit_net: Plot a PAFit_net object

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

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

Value

Outputs the desired plot.

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.

...

Other arguments to pass to the underlying plotting function.

Author

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

Examples

Run this code
    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")

Run the code above in your browser using DataLab