View source: R/plot-original-bipartite.R
plotBipartite | R Documentation |
This function converts the incidence matrix into an igraph object and provides network visualization in multiple ways.
plotBipartite(
inc_mat,
part = 0,
verbose = FALSE,
vertex.label.display = FALSE,
layout = layout.bipartite,
vertex.shape = c("square", "circle"),
vertix.color = c("steel blue", "orange"),
vertex.label.cex = 0.3,
vertex.size = 4,
edge.width = 0.4,
edge.color = "pink"
)
inc_mat |
A matrix, the incidence matrix of bipartite network. |
part |
An integer value indicates whether the original bipartite network or its projection should be plotted. The default value of 0 represents the original bipartite network. Other possibilities are 1 and 2 for two projected networks. |
verbose |
A logical value, if it is |
vertex.label.display |
A logical value, if it is |
layout |
A function from igraph package. The default is |
vertex.shape |
A string vector to define the shapes for two different sets of vertices. The default value is |
vertix.color |
A string vector to define the colors for two different sets of vertices. The default value is |
vertex.label.cex |
A numeric value used to define the size of vertex labels. The default value is 0.3. |
vertex.size |
A numeric value used to define the size of vertex. The default value is 4. |
edge.width |
A numeric value used to define the edge width. The default value is 0.1. |
edge.color |
A string used to define the color of edges. The default value is "pink". |
An igraph network object with visualization.
# load part of the beatAML data
beatAML_data <- NIMAA::beatAML[1:10000,]
# convert to incidence matrix
beatAML_incidence_matrix <- nominalAsBinet(beatAML_data)
# plot with the vertex label showing
plotBipartite(inc_mat = beatAML_incidence_matrix, vertex.label.display = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.