clusterprofiler: cnetplot/network plot not looking good
0
0
Entering edit mode
4.1 years ago
ccha97 ▴ 60

Hello, I am trying to get a network plot in 12.3 of the clusterProfiler book.

My code is like so:

network <- cnetplot(ego, categorySize="pvalue", showCategory = 3, node_label = "all", foldChange= geneList)

#save image png
png(filename="network.png") 
plot(network)

However, the output doesn't look so great, particularly to publish in a paper/thesis. Is there a way to make it look more presentable? I'm also using Windows - not sure if that's also a factor which is contributing to how it looks.

clusterprofiler ggplot • 3.4k views
ADD COMMENT
1
Entering edit mode

What exactly would you like to change? The color scheme? The width of the image? The font?

ADD REPLY
0
Entering edit mode

Sorry, should have stated that in my post - I guess the spacing between nodes (the two immune response nodes are very close to one another), as well changing the type/size of the font (perhaps making the smaller nodes - the genes, all capitals?) to make it more readable.

ADD REPLY
1
Entering edit mode

You can achieve more space by increasing the size of the image (see ?png how to specify the size for the PNG you're generating).

However, these plots are notoriously difficult to make legible; I strongly recommend to look into the heatplot function of clusterProfiler, which entails virtually the same information but in a much more compressed way. For more information on the tweaking of these plots, see clusterProfiler's documentation (Chapter 12]

ADD REPLY

Login before adding your answer.

Traffic: 2119 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6