ggnetwork
ggnetwork copied to clipboard
Right way to include user-defined palette for ggnetwork nodes
How can the palette
argument works for the ggnet
function can be reproduced while working with the ggnetwork
package?
ggnet2(netBio, size = "degree", size.cut = 10, node.color = "Source",
palette = c("cat1" = "#4daf4a", "cat2" = "#377eb8", "cat3" = "#e41a1c"),
alpha = 0.75, label = "ID",
edge.size = 1, edge.color = "grey", edge.alpha = 0.5)
I am using the above command and it works fine. I had an issue with the labels overlapping with one another and based on your advice here, I am shifting to ggnetwork
environment.