Learn R Programming

ANTsR (version 1.0)

plotPrettyGraph: Simple plotPrettyGraph function saves to png.

Description

PlotPrettyGraph given inputs from the makeGraph function. adapted from http://is-r.tumblr.com/.

Usage

plotPrettyGraph( graphObject, adjacencyMatrix, graphMetricValue, pngfn="graph.png", scaleText=0.5, vertexSize = NA, figScale=11 , layoutmode = "eigen" )

Arguments

graphObject

igraph graphObject

adjacencyMatrix

igraph adjacencyMatrix

graphMetricValue

igraph node-level graph value e.g. degree, page.rank, etc

pngfn

filename for output png

scaleText

relative size of text to vertices

vertexSize

cex size of vertices

figScale

the figure will be of square size 2^figScale in pixels

layoutmode

see gplot.layout in sna package

Value

no output

Examples

Run this code
# NOT RUN {
data("bold_correlation_matrix",package="ANTsR")
dmat<-data.matrix(bold_correlation_matrix)
gg<-makeGraph( dmat, 0.1 )
rownames(gg$adjacencyMatrix)<-colnames(bold_correlation_matrix)
plotPrettyGraph( gg$mygraph, gg$adjacencyMatrix, gg$degree , figScale=12 , scaleText=5 )
# }

Run the code above in your browser using DataLab