vivagraph {DiagrammeR} | R Documentation |
Render a graph object with the VivaGraphJS library.
vivagraph(graph = NULL, layout = "forceDirected", positions = NULL, config = NULL, height = NULL, width = NULL, elementId = NULL)
graph |
a |
layout |
a |
positions |
|
config |
|
height |
|
width |
|
elementId |
|
## Not run: # Create a graph using the \code{create_nodes}, \code{create_edges}, # and \code{create_graph} functions nodes <- create_nodes(nodes = LETTERS, type = "letter", shape = sample(c("circle", "rectangle"), length(LETTERS), replace = TRUE), fillcolor = sample(c("aqua", "gray80", "pink", "lightgreen", "azure", "yellow"), length(LETTERS), replace = TRUE)) edges <- create_edges(from = sample(LETTERS, replace = TRUE), to = sample(LETTERS, replace = TRUE), rel = "letter_to_letter") graph <- create_graph(nodes_df = nodes, edges_df = edges, graph_attrs = "layout = neato", node_attrs = c("fontname = Helvetica", "style = filled"), edge_attrs = c("color = gray20", "arrowsize = 0.5")) vivagraph(graph = graph) ## End(Not run)