AsiGraph <- function(
v,
g
) {
# convert vertex indices to an igraph object
if (is(v, "igraph.vs")) return(v)
class(v) <- "igraph.vs"
ne <- new.env()
assign("graph", g, envir = ne)
attr(v, "env") <- ne
v
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.