Skip to content

Instantly share code, notes, and snippets.

@bstancil
Last active October 29, 2015 18:15
Show Gist options
  • Save bstancil/12bfd9621a35c3368e21 to your computer and use it in GitHub Desktop.
Save bstancil/12bfd9621a35c3368e21 to your computer and use it in GitHub Desktop.
This is a gist
V(g)$label.cex <- 3 * (0.06125 * V(g)$degree / max(V(g)$degree) + .2)
V(g)$label.color <- rgb(0, 0, .2, .49 * V(g)$degree / max(V(g)$degree) + .5)
V(g)$frame.color <- rgb(0, 0, .2, .39 * V(g)$degree / max(V(g)$degree) + .6)
egam <- (log(E(g)$weight)+.4) / max(log(E(g)$weight)+.4)
E(g)$color <- rgb((colorRamp(c("blue", "yellow", "red"))(E(g)$weight/max(E(g)$weight)))/255)
E(g)$width <- egam
plot(g, layout=layout_on_sphere(g), vert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment