# NOT RUN {
# Create a simple graph
graph <-
create_graph() %>%
add_path(
n = 5,
edge_aes = edge_aes(
arrowhead = c(
"normal", "vee",
"tee", "dot"),
color = c(
"red", "blue",
"orange", "purple")))
# Create a PDF file for
# the graph (`graph.pdf`)
graph %>%
export_graph(
file_name = "graph.pdf",
title = "Simple Graph")
# Create a PNG file for
# the graph (`mypng.png`)
graph %>%
export_graph(
file_name = "mypng.png",
file_type = "PNG")
# }
Run the code above in your browser using DataLab