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

change edge color in cnetplot #278

Open
gqhhh opened this issue Jul 4, 2024 · 1 comment
Open

change edge color in cnetplot #278

gqhhh opened this issue Jul 4, 2024 · 1 comment

Comments

@gqhhh
Copy link

gqhhh commented Jul 4, 2024

Dear Yu group,
I use cnetplot function and set the parameter 'colorEdge' as TRUE. But I would like to set my own colors of edge instead of the default color, how can I do that?

@guidohooiveld
Copy link

guidohooiveld commented Nov 6, 2024

I realize that you have posted this a while ago,... Yet, for the archive:

With the current version of enrichplot you will need to use the argument color_edge, and provide the name (or hex code) of the color (default is: color_edge = "grey").
See ?cnetplot.

> library(clusterProfiler)
>  
> ## load example data
> data(geneList, package = "DOSE")
> de <- names(geneList)[1:100]
> 
> ## default analysis
> y1 <- enrichGO(de, 'org.Hs.eg.db',
+               ont = "CC",
+               pvalueCutoff = 0.05,
+               pAdjustMethod = "BH",
+               qvalueCutoff = 0.2)
> p1 <- cnetplot(y1, color_edge = "red", showCategory = 5)
> print(p1)
>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants