| networkPlot | R Documentation |
This function plots the graph of the data frame and optionally uses different colors for nodes belonging to different connected components.
networkPlot(
df,
title = NULL,
numCol = NULL,
numColType = c("weights", "ranks"),
nodeSize = 10,
nodeTextSize = 2.3,
palette = "grDevices::Spectral",
nodeColor = NULL,
edgeWidth = 1,
edgeColor = "black",
edgeScales = c(0.2, 0.6),
...
)
df |
Data frame. |
title |
Plot title. |
numCol |
Name of the numeric column used to vary edge widths. If no
such column is provided, set to |
numColType |
The type of the numeric column used to vary edge widths.
Choose between 'weights' and 'ranks' Ignored if |
nodeSize |
Size of graph nodes. |
nodeTextSize |
Size of text on graph nodes. |
palette |
grDevices palette used for coloring nodes.
Ignored if nodeColor is not |
nodeColor |
Color used for nodes. Default is |
edgeWidth |
Width to be used for all edges before scaling
if |
edgeColor |
Color used for edges. |
edgeScales |
Edge width scales. Must be a numeric vector of size 2 (minimum and maximum). |
... |
Additional arguments passed to |
An object of class ggraph.
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, numCol='rank', numColType='ranks')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.