Learn R Programming

brainGraph (version 2.7.3)

plot.brainGraph: Plot a brain graph with a specific spatial layout

Description

plot.brainGraph plots a graph in which the spatial layout of the nodes is important. The network itself is plotted over a brain MRI slice from the MNI152 template if mni=TRUE.

Usage

# S3 method for brainGraph
plot(x, plane = c("axial", "sagittal", "circular"),
  hemi = c("both", "L", "R"), subgraph = NULL, show.legend = FALSE,
  rescale = FALSE, asp = 0, main = NULL, subt = "default",
  mni = TRUE, ...)

plot_brainGraph(x, plane = c("axial", "sagittal", "circular"), hemi = c("both", "L", "R"), subgraph = NULL, show.legend = FALSE, rescale = FALSE, asp = 0, main = NULL, subt = "default", mni = TRUE, ...)

Arguments

x

A brainGraph graph object

plane

Character string indicating which orientation to plot (default: 'axial')

hemi

Character string indicating which hemisphere to plot (default: 'both')

subgraph

Character string specifying an equation for vertices to plot (default: NULL)

show.legend

Logical indicating whether or not to show a legend (default: FALSE)

rescale

Logical, whether to rescale the coordinates (default: FALSE)

asp

Numeric constant; the aspect ratio (default: 0)

main

Character string; the main title (default: NULL)

subt

Character string; the subtitle (default: default)

mni

Logical indicating whether or not to plot over a slice of the brain (default: TRUE)

...

Other parameters (passed to plot.igraph). See igraph.plotting for details.

Details

With the argument subgraph, you can specify a simple logical equation for which vertices to show. For example, 'degree > 10' will plot only vertices with a degree greater than 10. Combinations of AND (i.e., &) and OR (i.e., |) are allowed.

To remove the subtitle at the bottom, simply specify subt=NULL.

See Also

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

Examples

Run this code
# NOT RUN {
plot(g[[1]], hemi='R')
plot(g[[1]], subgraph='degree > 10 | btwn.cent > 50')
# }

Run the code above in your browser using DataLab