Hello! I performed a pathway enrichment analysis using clusterProfiler and I wanted to plot a gene network with it using the cnetplot function from the enrichplot package. However, I can't get the 0 to be in the middle of the color scale and this causes some confusion in the visual interpretation of the plot. I've seen that this topic has been already adressed on github (here and here, for example) but I honestly still don't understand what the actual solution is. Could someone post an actual example of how the code for that would look like? This is what I've done so far.
p1 <- cnetplot(pathways, showCategory = 10, foldChange = geneList, node_label="category", categorySize="pvalue") p1 + scale_color_gradientn(colours = c("green", "red"))
And this is how the plot looks, you can see that the color scale is unevenly distributed (I'll fix the overlapping node labels later, I'm more concerned about the color issue now) (Also, if anyone knows how to get rid of that "as.numeric(as.character(color))" that appears on top of the color scale, that would be a bonus track) Thanks in advance!