View source: R/delete_global_graph_attrs.R
delete_global_graph_attrs | R Documentation |
Delete one of the global attributes stored within a graph object of class
dgr_graph
).
delete_global_graph_attrs(graph, attr = NULL, attr_type = NULL)
graph |
A graph object of class |
attr |
The name of the attribute to delete for the |
attr_type |
The specific type of global graph attribute to delete. The
type is specified with |
A graph object of class dgr_graph
.
# Create a new graph and add
# some extra global graph attrs
graph <-
create_graph() %>%
add_global_graph_attrs(
attr = "overlap",
value = "true",
attr_type = "graph") %>%
add_global_graph_attrs(
attr = "penwidth",
value = 3,
attr_type = "node") %>%
add_global_graph_attrs(
attr = "penwidth",
value = 3,
attr_type = "edge")
# Inspect the graph's global
# attributes
graph %>%
get_global_graph_attr_info()
# Delete the `penwidth` attribute
# for the graph's nodes using the
# `delete_global_graph_attrs()` fcn
graph <-
graph %>%
delete_global_graph_attrs(
attr = "penwidth",
attr_type = "node")
# View the remaining set of global
# attributes for the graph
graph %>%
get_global_graph_attr_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.