Skip to contents

extracts the edge layer from a netify plot components object, allowing for manual plot construction and customization. this function is part of the modular plotting system that enables fine-grained control over network visualization elements.

Usage

netify_edge(comp)

Arguments

comp

a netify_plot_components object returned from plot(..., return_components = TRUE)

Value

a custom object of class "netify_edge" that can be added to a ggplot object using the + operator. the object contains the edge layer with all its aesthetic mappings and data.

Author

cassy dorff, shahryar minhas

Examples

# \donttest{
# create a netify object
mat <- matrix(c(NA, 1, 0, 0, NA, 1, 1, 0, NA), 3, 3,
    dimnames = list(c("alice", "bob", "carol"),
                    c("alice", "bob", "carol")))
net <- new_netify(mat, symmetric = FALSE)

# get plot components
comp <- plot(net, return_components = TRUE)

# build custom plot with edges
library(ggplot2)
ggplot() +
    netify_edge(comp)

# }