Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right way to include user-defined palette for ggnetwork nodes #70

Open
peranti opened this issue Sep 10, 2021 · 1 comment
Open

Right way to include user-defined palette for ggnetwork nodes #70

peranti opened this issue Sep 10, 2021 · 1 comment
Assignees
Labels

Comments

@peranti
Copy link

peranti commented Sep 10, 2021

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.

@briatte
Copy link
Owner

briatte commented Mar 7, 2023

Hi @peranti — Very late answer, sincere apologies for that. ggnetwork supports ggplot2 scales, so using scale_*_manual should work.

@briatte briatte self-assigned this Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants