plot.diffusion {autograph}R Documentation

Plotting diffusion models

Description

Plotting diffusion models

Usage

## S3 method for class 'diff_model'
plot(x, ..., all_steps = TRUE)

## S3 method for class 'diffs_model'
plot(x, ...)

## S3 method for class 'learn_model'
plot(x, ...)

Arguments

x

A "diff_model" of "diffs_model" class of object. E.g. as a result from manynet::play_diffusion().

...

Other arguments to be passed.

all_steps

Whether all steps should be plotted or just those where there is change in the distributions.

Value

plot.diff_model() returns a bar chart of the number of new infected nodes at each time point, as well as an overlay line plot of the total of infected

Examples

plot(res_manynet_diff)
plot(res_migraph_diff)
plot(play_learning(ison_networkers, beliefs = runif(net_nodes(ison_networkers))))

[Package autograph version 0.1.2 Index]