powered by
Save network as a ggplot2 object to file using ggsave.
sn_save_ggplot( network, filename, width = 7, height = 7, dpi = 300, title = NULL, ... )
The output filename, invisibly.
filename
A cograph_network object.
Output filename. Format is detected from the extension by ggplot2::ggsave().
ggplot2::ggsave()
Width in inches (default 7).
Height in inches (default 7).
Resolution for raster formats (default 300).
Optional plot title.
Additional arguments passed to ggsave.
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3) net <- cograph(adj) sn_save_ggplot(net, file.path(tempdir(), "network.pdf"))
Run the code above in your browser using DataLab