Unlimited learning, half price | 50% off
Get 50% off unlimited learning

JointNets (version 2.0.1)

plot_brain.diffee: plot 3d brain network from diffee result

Description

This function plots 3d brain network from diffee result

Usage

# S3 method for diffee
plot_brain(x, type = "task", neighbouroption = "task",
  subID = NULL, index = NULL, hastitle = TRUE, haslegend = TRUE,
  hasbackground = TRUE, ...)

Arguments

x

output generated from diffee function (diffee class)

type

type of graph. There are two options:

  • "task" (difference graph)

  • "neighbour" (zoom into nodes in the difference graph specified further by parameter "index" (node id)

neighbouroption

not used

subID

not used

index

determines which node(s) to zoom into when parameter "type" is "neighbour". This parameter could either be an integer or vector of integers representing node ids

hastitle

determines whether the graph title is displayed or not (TRUE to display / FALSE to hide)

haslegend

not used

hasbackground

determines whether the reference brain is plotted or not (TRUE to display / FALSE to hide)

...

extra parameters passed to igraph::rglplot()

Value

3d (rgl) brain network

Details

The function plots brain network using rglplot.igraph

Examples

Run this code
# NOT RUN {
library(JointNets)
graphics.off()
par(ask=FALSE)
par(mfrow=c(1,1))
data(ABIDE_aal116_timeseries)
data(aal116coordinates)
layout = cbind(aal116coordinates$x.mni + 90,
aal116coordinates$y.mni+126, aal116coordinates$z.mni+72)
result = simulation(p=116, s = 0.001, ss = 0.001, n = c(1,1))$simulatedgraphs
class(result) = "simule"
plot_brain(result, type = "task", neighbouroption = "task",
subID = NULL, index = NULL, layout = layout, hasbackground = FALSE)
# }
# NOT RUN {
result = diffee(ABIDE_aal116_timeseries[[1]],
ABIDE_aal116_timeseries[[2]], 0.001)
plot_brain(result, type = "task", neighbouroption = "task",
subID = NULL, index = NULL, layout = layout)
# }

Run the code above in your browser using DataLab