get_global_graph_attr {DiagrammeR}R Documentation

Get global graph attributes

Description

Get the presently set global attributes for a graph object of class dgr_graph.

Usage

get_global_graph_attr(graph)

Arguments

graph

a graph object of class dgr_graph that is created using create_graph.

Value

a list object containing global attributes for a graph.

Examples

## Not run: 
library(magrittr)

# Create a new graph and set some global attributes
graph <- create_graph() %>%
  set_global_graph_attr("graph", "overlap", "true") %>%
  set_global_graph_attr("node", "fontname", "Helvetica") %>%
  set_global_graph_attr("edge", "color", "gray")

# Verify that the global attributes have been set
get_global_graph_attr(graph)
#> $graph_attrs
#> [1] "overlap = true"
#>
#> $node_attrs
#> [1] "fontname = Helvetica"
#>
#> $edge_attrs
#> [1] "color = gray"

## End(Not run)

[Package DiagrammeR version 0.8.2 Index]