Skip to content

Instantly share code, notes, and snippets.

@jakosz
Created February 11, 2014 12:46
Show Gist options
  • Save jakosz/8934223 to your computer and use it in GitHub Desktop.
Save jakosz/8934223 to your computer and use it in GitHub Desktop.
# Wrappers: include opening and closing of graphical device;
plot_igraph <-
function(g, file, width, height) {
png(file, width = width, height = width)
plot(g, vertex.size = 3, vertex.color = 'black', vertex.frame.color = NA,
vertex.label = NA, edge.arrow.mode = 0, edge.color = rgb(0,0,0,.2))
dev.off()
}
png_segments <-
function(g, file, width, height) {
png(file, width = width, height = width)
plot_segments(g)
dev.off()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment