export image from cnet plot and bar plot
Hi all,
I want to save an image from a plot, created by cnetplot in R. \
However, when I use ggsave, it doesn't save my plot in the size of I wanted. It is just like this:
but I want to my image looks like this:
Here is my code:
p_cnetplot <- cnetplot(ego,
categorySize="count",
showCategory = 10,
foldChange=OE_foldchanges,
layout = "kk",
vertex.label.font=7,
colorEdge = TRUE)
ggsave("padj.png", p_cnetplot, units = "px", width = 1919, height = 1120)
ego is a "enrichResult" object. Thank you
• 2,135 views
•
link
1 answer
I save my plot with png() method. It worked.
• 0 views
•
link
Log in to answer this question.
It's working fine for me. code that is working for me:
Hi, thanks for your reply. I don't know why is not working for me. But I save my plot with png() function and it worked. Have a good time!