save_graph {foodingraph} | R Documentation |
Save graph
Description
Save the graph generated from graph_from_matrix
or graph_from_links_nodes
or
compare_graphs
.
Usage
save_graph(graph, filename = "foodingraph_%03d.png", width = NULL,
height = NULL, dpi = 300, ...)
Arguments
graph |
: the graph |
filename |
(optional) : the name of the file and format. Default is "foodingraph_*.png". |
width |
(optional) : width of the image in cm. Default is 25 cm for a single graph or a comparison in a vertical position. For a comparison in an horizontal position, 40cm. |
height |
(optional) : height of the image in cm. Default is 20 cm for a single graph, 25cm for a comparison in an horizontal position. For a comparison in a vertical position, 40cm. |
dpi |
(optional) : the resolution of the image in dpi. Default is 300 |
... |
: other parameters to pass to the |
Examples
adj_matrix <- cor(iris[,-5])
legend <- data.frame(name = colnames(iris[,-5]),
title = colnames(iris[,-5]))
graph_iris <- graph_from_matrix(adj_matrix, legend, main_title = "Iris graph")
# Save to a in a temporary file location
save_graph(graph_iris, tempfile(fileext = ".png"))
[Package foodingraph version 0.1.0 Index]