Learn R Programming

brainGraph (version 1.0.0)

plot_brainGraph: Plot a brain graph with a specific spatial layout

Description

This function plots a graph when the spatial layout of the nodes is important (e.g. in the brain). The function set_brainGraph_attr needs to be run on the graph, and a valid set of coordinates provided for the vertices. Most of the parameters valid here can be seen in igraph.plotting.

Usage

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

Arguments

g
An igraph graph object
plane
A character string indicating which orientation to plot (default: 'axial')
hemi
A character string indicating which hemisphere to plot (default: 'both')
subgraph
A character string specifying an equation for deleting vertices (default: NULL)
show.legend
Logical indicating whether or not to show a legend (default: FALSE)
rescale
A logical, whether to rescale the coordinates (default: FALSE)
asp
A numeric constant for the aspect ratio (default: 0)
main
Character string for the main title (default: NULL)
sub
Character string for the subtitle (default: default)
...
Other parameters (passed to plot).

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 sub=NULL.

See Also

Other Plotting functions: plot_brainGraph_gui, plot_brainGraph_list

Examples

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

Run the code above in your browser using DataLab