Print EnhancedVolcano Plot as jpeg or similar in R Notebook
1
0
Entering edit mode
Bine ▴ 20
@bine-23912
Last seen 20 days 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 • 186 views
1
Entering edit mode
@kevin
Last seen 12 minutes 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?

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()

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

1
Entering edit mode

Great! problem solved, then?