This is a test version of Biostars. For the public version, visit https://www.biostars.org.
clusterprofiler: cnetplot/network plot not looking good

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

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

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.

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]

0 answers

No answers yet.

Log in to answer this question.