plot.brainGraph {brainGraph}R Documentation

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 by default (when mni=TRUE).

Usage

## S3 method for class 'brainGraph'
plot(x, plane = c("axial", "sagittal", "circular"),
  hemi = c("both", "L", "R"), mni = TRUE, subgraph = NULL,
  main = NULL, subtitle = "default", label = NULL, side = 1,
  line = -2, adj = 0.025, cex = 2.5, col = "white", font = 2,
  show.legend = FALSE, rescale = FALSE, asp = 0, ...)

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'

mni

Logical indicating whether or not to plot over a slice of the brain. Default: TRUE

subgraph

Character string specifying a logical condition for vertices to plot. Default: NULL

main

Character string; the main title. Default: NULL

subtitle

Character string; the subtitle. Default: 'default'

label

Character string specifying text to display in one corner of the plot (e.g., 'A.'). Default: NULL

side

Label placement. Default: 1 (bottom)

line

Which margin line to place the text.

adj

If side=1, a value closer to 0 places the text closer to the left margin. Default: 0.025

cex

Amount of character expansion of the label text. Default: 2.5

col

Label font color. Default: 'white'

font

Integer specifying the font type. Default: 2 (bold face)

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

...

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

Selecting specific vertices to display

With the argument subgraph, you can supply a simple logical expression specifying 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. This requires that any vertex attribute in the expression must be present in the graph; e.g., V(g)$degree must exist.

Title, subtitle, and label

By default, a title (i.e., text displayed at the top of the figure) is not included. You can include one by passing a character string to main, and control the size with cex.main. A subtitle (i.e., text at the bottom), is included by default and displays the number of vertices and edges along with the graph density. To exclude this, specify subtitle=NULL. A “label” can be included in one corner of the figure (for publications). For example, you can choose label='A.' or label='a)'. Arguments controlling the location and appearance can be changed, but the default values are optimal for bottom-left placement. See mtext for more details. The label-specific arguments are:

side

The location. 1 is for bottom placement.

line

If side=1 (bottom), a negative number places the text above the bottom of the figure; a higher number could result in the bottom part of the text to be missing. This can differ if plane='circular', in which case you may want to specify a positive number.

adj

Seems to be the percentage away from the margin. So, for example, adj=0.1 would place the text closer to the center than the default value, and adj=0.5 places it in the center.

cex

The degree of “character expansion”. A value of 1 would not increase the text size.

col

The text color.

font

The font type. The default font=2 is bold face. See par for details.

Author(s)

Christopher G. Watson, cgwatson@bu.edu

See Also

Other Plotting functions: Plotting GLM graphs, plot.brainGraphList, plot_brainGraph_multi

Examples

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

## Place label in upper-left
plot(g.ex, label='A)', side=3, line=-2.5)

## End(Not run)

[Package brainGraph version 3.1.0 Index]