Great package igraph, but I'm struggling to save the plots. I have trawled the net without success. This is some sample code, how can I save the resulting plot?
Test <- data.frame(
FirstName=c("Bob","Charlie","Beth","Sam"),
Age=c(23,56,41,33))
Friends <- c(1,2,1,4,2,4,3,4)
g <- graph.empty (4, directed = FALSE)
V(g)$color <- "lightblue" #Nodes$NodeColour
V(g)$label <- as.character(Test$FirstName)
g <- add.edges(g, Friends)
plot(g,
vertex.label.color="black",
vertex.shape="sphere",
vertex.label.cex = 0.5,
vertex.size=24,
layout=layout.circle)
title("Friend Network",cex.main=1,col.main="blue")
#how do you save plot as a png?