plot_brainGraph_multi: Save PNG of three views of a brain graph

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plot_brainGraph_multi.R

Description

This function will save a PNG file to disk containing three views (columns) of a brain graph (from left-to-right): left sagittal, axial, and right sagittal. The number of rows in the figure will equal the number of groups to plot.

Usage

1
2
plot_brainGraph_multi(g.list, groups = 1, N = 1, filename = "tmp.png",
  subgraph = NULL, main = NULL, ...)

Arguments

g.list

A list of lists of igraph graph objects

groups

An integer vector indicating which groups to plot; corresponds to the first element of the list g.list (default: 1)

N

Integer corresponding to the second element of the list g.list (default: 1)

filename

Character string of the filename of the PNG to be written (default: 'tmp.png')

subgraph

A list of character strings to (optionally) subset the graph(s), possibly by multiple conditions (default: NULL)

main

A list of character strings to be placed in the main title of the center plot for each group (default: NULL)

...

Other arguments passed to plot_brainGraph

Details

The function argument N tells the function to use the N-th element of the input list g.list for each group. So, for example, if g.list consists of lists of graphs for two groups, and N is 4, then the plots for g.list[[1]][[4]] and g.list[[2]][[4]] will be written to the file.

The subgraph argument can be used to apply one or more conditions for subsetting the graph. If you would like multiple conditions, then it must be a list variable that equals in length to the number of groups. For a single group and multiple conditions, simply write e.g., groups=c(1, 1). The main argument has the same rule except it controls the main plot title, which appears in the axial view along with the Group name.

Author(s)

Christopher G. Watson, [email protected]

See Also

Other Plotting functions: plot.brainGraph_GLM, plot.brainGraph_NBS, plot.brainGraph_mediate, plot.brainGraph_mtpc, plot.brainGraph, plot_brainGraph_gui, plot_brainGraph_list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
plot_brainGraph_multi(g.hubs, groups=1:2, filename='Figure01_hubs.png',
  subgraph='N > 0', vertex.color='color.lobe', vertex.size=15,
  show.legend=TRUE, vertex.label.cex=1.5)
## Single group, different subgraphs for each plot
plot_brainGraph_multi(g, groups=c(1, 1), N=5, filename='5_6core.png',
  vertex.color='color.lobe', edge.color='color.lobe', vertex.label=NA,
  subgraph=list('coreness > 5', 'coreness > 6'),
  main=list('k-core 5', 'k-core 6'))

## End(Not run)

brainGraph documentation built on May 29, 2018, 9:03 a.m.