Skip to contents

This function plots a transition network analysis (TNA) model using the cograph package. The nodes in the graph represent states, with node sizes corresponding to initial state probabilities. Edge labels represent the edge weights of the network. See cograph::splot() for details on how to further configure the plot.

Usage

# S3 method for class 'tna'
plot(
  x,
  node_list,
  use_list_order = TRUE,
  scale_nodes,
  scaling_factor = 0.5,
  ...
)

Arguments

x

A tna object from build_model().

node_list

An optional list of two character vectors that define two mutually exclusive groups of node labels.

use_list_order

A logical value. If node_list is provided, defines how the order of the nodes in the plot is defined. A TRUE value uses the order in node_list. Otherwise, the nodes are ranked based on edge weights and ordered according to the rank.

scale_nodes

A character string giving the name of a centrality measure to scale the node size by. See centralities() for valid names. If missing (the default), uses default cograph::splot() scaling. The value of node_size provided via ... is used as baseline size.

scaling_factor

A numeric value specifying how strongly to scale the nodes when scale_nodes is provided. Values between 0 and 1 will result in smaller differences and values larger than 1 will result in greater differences. The default is 0.5.

...

Additional arguments passed to cograph::splot() or cograph::plot_htna().

Value

A cograph_network plot of the transition network.

Examples

model <- tna(group_regulation)
plot(model)