Learn R Programming

brainGraph (version 0.62.0)

plot_brainGraph_list: Write PNG files for a list of graphs

Description

This function takes a list of igraph graph objects and plots them over an axial slice of the brain. A png file is written for each element of the list, which can be joined as a gif or converted to video using a tool outside of R.

Usage

plot_brainGraph_list(g.list, fname.base, diffs = FALSE, subgraph = NULL, ...)

Arguments

g.list
A list of igraph graph objects
fname.base
A character string specifying the base of the filename for png output
diffs
A logical, indicating whether or not to highlight edge differences (default: FALSE)
subgraph
A character string specifying an equation for deleting vertices (default: NULL)
...
Other parameters (passed to plot_brainGraph)

Details

You can choose to highlight edge differences between subsequent list elements, and whether to color vertices by lobe, community membership, or lightblue (the default) (or a color of your choosing). By default, the vertex sizes are equal to vertex degree, and max out at 20; however, you may choose other values. Finally, you may choose to plot only a subgraph of vertices based on some criteria (see examples).

This function may be particularly useful if the graph list contains graphs of a single subject group at incremental densities, or if the graph list contains graphs of each subject in a group.

Examples

Run this code
## Not run: 
# plot_brainGraph_list(g[[1]], 'g1', subgraph='hemi == "R"')
# plot_brainGraph_list(g[[1]], 'g1', subgraph='degree > 10 | btwn.cent > 50')
# ## End(Not run)

Run the code above in your browser using DataLab