Print EnhancedVolcano Plot as jpeg or similar in R Notebook
1
0
Entering edit mode
Bine ▴ 50
@bine-23912
Last seen 6 months ago
UK

Dear all,

I have created an enhancedvolcano plot, which worked perfectly. But now i am struggling a bit to save it as an image in a R Notebook.

Can anyone advise me how to do it?

I tried right click and download or copy image but it doesnt work.

Thanks so much!

EnhancedVolcano • 3.2k views
ADD COMMENT
1
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 9 days ago
Republic of Ireland

Hi, I am the main developer of EnhancedVolcano. This question seems unrelated to any technical issue pertaining to the package. Irrespective, can you show me the code chunk from your markdown where you are trying to generate the plot?

ADD COMMENT
0
Entering edit mode

I am trying to save this plot to a jpeg or similar:

EnhancedVolcano(top_volcano,
                lab = top_volcano$gene,
                x = 'log2FoldChange',
                y = 'pvalue',
                title = 'Differential Expression Analysis',
                subtitle = "test",
                pCutoff =10e-7 ,
                FCcutoff = 1.2,
                pointSize = 3.0,
                labSize = 6.0)

Thank you!!

ADD REPLY
1
Entering edit mode

Hi, you just need the jpeg() function, for example:

jpeg('EV.jpg')
  EnhancedVolcano(top_volcano,
                lab = top_volcano$gene,
                x = 'log2FoldChange',
                y = 'pvalue',
                title = 'Differential Expression Analysis',
                subtitle = "test",
                pCutoff =10e-7 ,
                FCcutoff = 1.2,
                pointSize = 3.0,
                labSize = 6.0)
dev.off()

Depending on the situation, you may need the following:

jpeg('EV.jpg')
  print(EnhancedVolcano(top_volcano,
                lab = top_volcano$gene,
                x = 'log2FoldChange',
                y = 'pvalue',
                title = 'Differential Expression Analysis',
                subtitle = "test",
                pCutoff =10e-7 ,
                FCcutoff = 1.2,
                pointSize = 3.0,
                labSize = 6.0))
dev.off()

Also take a look at ggsave()

ADD REPLY
0
Entering edit mode

Thank you. The jpg it creates this way is empty. Remember I am doing it in R Notebook. But it did work with ggsave().

Many thanks

ADD REPLY
1
Entering edit mode

Great! problem solved, then?

ADD REPLY

Login before adding your answer.

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