View source: R/ExplodeLayoutBasic.R
plot_binet_ggplot2 | R Documentation |
Plot bipartite network given node list (label, coordinates, shape, color) and incidence matrix.
plot_binet_ggplot2(nodelist, incidence_matrix, plotlabel = "c")
nodelist |
A dataframe of at least 5 columns: Label, X, Y, Color, baseShape. |
incidence_matrix |
A matrix where row names and column names are the node ID of a bipartite network. An element of the i-th row and j-th column of the matrix is 0 if node on row i is not connected to node on column j, and edge weight if they are connected. |
plotlabel |
A string indicating whether to add node label text. 'r' for rows, 'c' for columns, and 'rc' for both rows and columns of the incidence_matrix. All other strings will be ignored. Default to 'c'. |
a ggplot2 object p which can be shown using print(p).
exploded_nodelist=get_explode_nodelist(example_nodelist,radius=1.2) p=plot_binet_ggplot2(exploded_nodelist,example_incidmat) print(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.