Provides a convenient way to set labels for aesthetic scales in netify plots. This function simplifies the process of labeling scales that may be spread across different layers (edges, nodes, text, labels).
Value
A custom object of class "netify_labels" that can be added to a netify plot using the + operator
Details
This function provides a user-friendly interface for setting scale labels without needing to understand the complexity of ggnewscale. The naming convention is:
edge_*
for edge aesthetics (e.g., edge_color, edge_alpha)node_*
orpoint_*
for node aesthetics (both work)text_*
for text label aestheticslabel_*
for boxed label aesthetics
Note
This function only works with plots created using netify's plot method. It will issue a warning if used with other ggplot objects.
Examples
if (FALSE) { # \dontrun{
# set labels for different scales
plot(my_netify_obj,
edge_alpha_var = "weight",
point_size_var = "degree") +
netify_scale_labels(
edge_alpha = "Connection Strength",
node_size = "Node Degree" # node_* is converted to point_*
)
} # }