plot_binet_ggplot2: Plot bipartite network given node list (label, coordinates,...

View source: R/ExplodeLayoutBasic.R

plot_binet_ggplot2R Documentation

Plot bipartite network given node list (label, coordinates, shape, color) and incidence matrix.

Description

Plot bipartite network given node list (label, coordinates, shape, color) and incidence matrix.

Usage

plot_binet_ggplot2(nodelist, incidence_matrix, plotlabel = "c")

Arguments

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'.

Value

a ggplot2 object p which can be shown using print(p).

Examples

exploded_nodelist=get_explode_nodelist(example_nodelist,radius=1.2)
p=plot_binet_ggplot2(exploded_nodelist,example_incidmat)
print(p)

ExplodeLayout documentation built on July 1, 2022, 9:06 a.m.