powered by
This function plots the graph of the data frame and optionallt uses different colors for nodes belonging to different connected components.
networkPlot( df, title = "Network plot", rankCol = "rank", edgeScale = 2, nodeSize = 10, nodeTextSize = 2.3, palette = "Spectral", nodeColor = NULL, edgeColor = "black", ... )
An object of class ggraph.
ggraph
Data frame.
Plot title.
Name of the rank column.
Scaling factor used in generating edge weights.
Size of graph nodes.
Size of text on graph nodes.
grDevices palette used for coloring nodes. Ignored if nodeColor is not NULL.
NULL
Color used for nodes. Default is NULL (palette will instead be used).
palette
Color used for edges.
Other arguments passed to centerTitle.
centerTitle
df <- data.frame(gene1 = paste0('G', c(1, 2, 5, 6, 7, 17)), gene2 = paste0('G', c(2, 5, 8, 11, 11, 11)), rank = c(1, 1, 3, 3, 3, 3)) networkPlot(df)
Run the code above in your browser using DataLab