Closed dengxuebin closed 8 months ago
Hi! Try removing the groups argument. If you use groups
, then color
is used to indicate the color per group not per node.
Hi! Try removing the groups argument. If you use
groups
, thencolor
is used to indicate the color per group not per node.
Hi, but I need groups, based on your reply, I got the picture below ,which had only one legend:
what I need is like the picture below:
I think the key is how to map the "groups/legends" to the "color=nodecolor_fig1$color_nb"
In this case you should only supply a vector of 6 colors to the color
argument (one per group).
Hi SachaEpskamp I found colors of legend by groups was not worked when I used "color" customized. The only one color was displayed. Hope your reply. Thanks a lot! The code is following: fig2 <- qgraph( wadj, layout = "spring", vsize = 3.5, groups = community_structure, edge.color = Network$results$pairwise$edgecolor, color = nodecolor_fig1$color_nb, filetype = "pdf", filename = "nobridge", threshold = 0.06, theme = "Hollywood", palette = "colorblind", label.color = "black", title = "nobridge", legend = TRUE )
the legend by group is like