get_global_graph_attrs {DiagrammeR} | R Documentation |
Get the presently set global attributes
for a graph object of class dgr_graph
.
get_global_graph_attrs(graph)
graph |
a graph object of class
|
a list object containing global attributes for a graph.
library(magrittr) # Create a new graph and set some global attributes graph <- create_graph() %>% set_global_graph_attrs( "graph", "overlap", "true") %>% set_global_graph_attrs( "node", "fontname", "Helvetica") %>% set_global_graph_attrs( "edge", "color", "gray") # Verify that the global attributes have been set get_global_graph_attrs(graph) #> $graph_attrs #> [1] "overlap = true" #> #> $node_attrs #> [1] "fontname = Helvetica" #> #> $edge_attrs #> [1] "color = gray"