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.attributes 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

1
2
3
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.

Author(s)

Christopher G. Watson, cgwatson@bu.edu

Examples

1
2
3
4
5
## Not run: 
plot_brainGraph(g[[1]], hemi='R')
plot_brainGraph(g[[1]], subgraph='degree > 10 | btwn.cent > 50')

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.