Treeplot
1
1
Entering edit mode
2.4 years ago
synat.keam ▴ 100

Dear All,

I have used treeplot to visualize my enrichment term and wanted to removed the label I circled in the box. Any member is able to assist me.

The tree plot documentation was not clear to me and I could not make it to work.

Here is my code chunk.

library(enrichplot)

edox2 <- pairwise_termsim(ego3)

treeplot(edox2, hclust_method = "average", label_format = 30)

enter image description here

Thank for your help in advance.

Kind Regards,

synat

ClusterProfiler • 3.6k views
ADD COMMENT
2
Entering edit mode
2.4 years ago
Mark ★ 1.5k

Try setting the nWords = 0. That function is calling ggtree under the hood. The ggtree function geom_cladelab will add those labels you're mentioning.

You could recreate that figure in ggtree manually if you wanted.

ADD COMMENT
0
Entering edit mode

Hi Mark,

it works. sorry to bother with another one. Can I remove the line in the circle and move the number of genes and p.adjust closter so it saves sapce.

I will read the documentation of the treeplot in more details too. thank for your helps.

Regards,

synat

enter image description here

ADD REPLY
0
Entering edit mode

Hey synat,

The documentation isn't great for that function so don't beat yourself up. I had to dig into the source code for it to figure out what might disable the cladelabs.

With regards to your new problem, look into ggtree options as the function should allow the same options as ggtree. Try this:

treeplot(edox2, hclust_method = "average", label_format = 30) + 
theme(legend.position="bottom")

At this point I suggest either recreating the plot in ggtree from scratch or editing the image manually in a pdf editor.

ADD REPLY
0
Entering edit mode

Dear Mark,

thank you so much for your patience and kind help. so much appreciated. I will try today again. Good weekend to you.

Regards, synat

ADD REPLY

Login before adding your answer.

Traffic: 2510 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