Closed prummer closed 5 years ago
Hi @prummer
Thanks for reporting this, and sorry for answering this so very, very late.
I'm failing to reproduce the issue:
# build graph
net <- sna::rgraph(10, mode = "graph", tprob = 0.5)
net <- network::network(net, directed = FALSE)
# single-color palette
net %v% "color" <- "foo"
custom_palette <- c("foo" = "red")
ggnet2(net, color = "color") # all nodes are grey
ggnet2(net, color = custom_palette) # all nodes are red
Please post a reproducible example if you are still facing the issue.
When the vertex attribute V(net)$color has only 1 unique label (="Mixed"), then
works fine but
does not:
The workaround
does the trick but does not plot a legend.
This behavior is unexpected to me. Maybe you can provide help or a fix.
Thanks in advance & best regards
Michael.