# NOT RUN {
library(XGR)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
AA.template <- xRDataLoader("AA.template",
RData.location=RData.location)
# consensus tree
ig <- AA.template$consensus$ig
# Default: partition-like circular layout
# none
gp <- xGGraph(ig, node.label.direction="none", node.label.wrap=50)
# leftright
gp <- xGGraph(ig, node.label.direction="leftright", node.label.wrap=50,
node.label.offset=0.5)
# topbottom
gp <- xGGraph(ig, node.label.direction="topbottom", node.label.wrap=50,
node.label.offset=0.5)
# advanced usage
## ggraph layouts
gp <- xGGraph(ig, layout='dendrogram',
node.label.direction="leftright")
gp <- xGGraph(ig, layout='treemap')
gp <- xGGraph(ig, layout='circlepack')
## igraph layouts
set.seed(825)
gp <- xGGraph(ig, layout='nicely', node.label.direction="leftright")
gp <- xGGraph(ig, layout='kk')
gp <- xGGraph(ig, layout='fr', node.label.direction="leftright")
gp <- xGGraph(ig, layout='gem')
# }
Run the code above in your browser using DataLab