Visnetwork plot is not saved as png image
问题 I plot a simple network using visNetwork but when I try to save it as png I get an empty image as a result. png("ex.png") require(visNetwork, quietly = TRUE) # minimal example nodes <- data.frame(id = 1:3) edges <- data.frame(from = c(1,2), to = c(1,3)) visNetwork(nodes, edges, width = "100%") dev.off() 回答1: You can save the network as html and then capture the content of that file: nodes <- data.frame(id = 1:3) edges <- data.frame(from = c(1,2), to = c(1,3)) library(visNetwork) plot<-