plotPrettyGraph.Rd
PlotPrettyGraph given inputs from the makeGraph function. adapted from http://is-r.tumblr.com/.
plotPrettyGraph(
adjacencyMatrix,
functionToPlot,
pngfn = tempfile(fileext = ".png"),
scaleText = 0.5,
vertexSize = NA,
figScale = 11,
layoutmode = "eigen",
hueval = 0
)
igraph adjacencyMatrix
igraph node-level graph value e.g. degree, page.rank, etc
filename for output png or to screen if NA
relative size of text to vertices
cex size of vertices
the figure will be of square size 2^figScale in pixels
see gplot.layout in sna package
controls the hue in hsv
no output
data("bold_correlation_matrix", package = "ANTsR")
dmat <- data.matrix(bold_correlation_matrix)
if (usePkg("igraph")) {
gg <- makeGraph(dmat, 0.1)
rownames(gg$adjacencyMatrix) <- colnames(bold_correlation_matrix)
plotPrettyGraph(gg$adjacencyMatrix, gg$degree, figScale = 12, scaleText = 5)
}
#> sna: Tools for Social Network Analysis
#> Version 2.8 created on 2024-09-07.
#> copyright (c) 2005, Carter T. Butts, University of California-Irvine
#> For citation information, type citation("sna").
#> Type help(package="sna") to get started.
#> [1] "/tmp//Rtmpx3PKqM/filebbf1d181ae0.png"