enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

Adjust text size and location with cnetplot

Open YyLu5 opened this issue 5 years ago • 9 comments

Hi Dr. Yu,

Thank you for your packages which made visualization easy and nice! I'm using cnetplot function to visualize the relationship between genes and GO terms. My issue is the gene names and GO terms on the plots are too large, especially when I show many categories the plot became very messy. Is there a way to change the label size or even font type? Thank you!

YyLu5 avatar Oct 01 '20 02:10 YyLu5

cnetplot has parameters to adjust the size of the node label. Please see the documentation.

huerqiang avatar Oct 01 '20 03:10 huerqiang

I tried node_label_size, cex_label_category and cex_label_gene, none of them had effects on the label. Sorry I couldn't find any useful documentations. The clusterProfiler book did not mention it.

YyLu5 avatar Oct 01 '20 03:10 YyLu5

Are you using the latest version of enrichplot on GitHub?

huerqiang avatar Oct 01 '20 03:10 huerqiang

I'm using enrichplot 1.8.1, my R version 4.0.2

YyLu5 avatar Oct 01 '20 03:10 YyLu5

please install the latest version of enrichplot(1.9.3.991), and use cex_label_category , cex_label_gene parameters.

huerqiang avatar Oct 01 '20 03:10 huerqiang

Great! It worked! Another question, is it possible to change the distance of the label to the node? The GO name are too close to the plot, which made it hard to read.

YyLu5 avatar Oct 01 '20 04:10 YyLu5

This feature is not available yet.

huerqiang avatar Oct 01 '20 04:10 huerqiang

Then I guess I can't change the width of the line connect name to node?

YyLu5 avatar Oct 01 '20 05:10 YyLu5

Update: I used this https://bioconductor.org/packages/devel/bioc/html/enrichplot.html and installed enrichplot version 1.9.4

How can I update the enrichplot to 1.9. I re-install using http://www.bioconductor.org/packages/release/bioc/html/enrichplot.html and still version 1.8. My R and R studio are updated to versions 4.0.3 and R studio Version 1.3.1093.

NeginValizadegan avatar Oct 14 '20 16:10 NeginValizadegan