clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

I want to change cnetplot foldchange scale

Open eileen316 opened this issue 6 years ago • 4 comments

image

In cnetplot, I want to change foldchange scale. please give an advise~

image

eileen316 avatar Apr 17 '19 08:04 eileen316

I am in the same situation, Waiting the solutions.

Chuan-Jiang avatar May 31 '19 07:05 Chuan-Jiang

I have the same problem. Waiting for the advice~

yjhongHK avatar Jan 22 '20 08:01 yjhongHK

I am in the same situation. I am performing comparative analysis and showing two cnet plots, these looks very nice side-by-side with two different treatments, but when I am comparing foldchange values, the different scale makes is so annoying. Also, reviewer did not like the different scale. It would be great to add min/max scale limits. Please advice.

sagarutturkar avatar Jul 21 '21 10:07 sagarutturkar

Never mind! I was able to achieve this using ggplot features. Hope the code below will help others:

library(RColorBrewer)

RYD  = brewer.pal(n = 8, name = "RdYlBu")

cnetplot(GO.BP, showCategory = Go_select, colorEdge = TRUE, foldChange=log2fc__vec) + 
  scale_colour_gradientn(colours = RYD, limits=c(-6, 6))
  ggtitle("Condition A") +
  theme(plot.title = element_text(size = 20, face = "bold", hjust = 0.5))
  

sagarutturkar avatar Jul 21 '21 15:07 sagarutturkar