plot.PAFit_net: Plot a 'PAFit_net' object

View source: R/plot.PAFit_net.R

plot.PAFit_netR Documentation

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 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.

...

Other arguments to pass to the underlying plotting function.

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

    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 June 22, 2024, 11:06 a.m.