Question: Enhanced volcano: how to control the size, and to plot multiple volcanos to one PDF page?
gravatar for micecanfly
4 months ago by
micecanfly0 wrote:

I am trying to plot multiple volcano plots to the same PDF page with the following code. However, instead I get a PDF file with multiple pages, one plot on each. Also pdf('volcanos.pdf', width = 10, height = 10) controls for the size of each page but not the plot itself. How to control for the size of each volcano plot, and to plot many of them on the same page? data = my dataframe with datasets from volcano plots

for(i in 1:(ncol(data)/2)) {
  pdf(paste0('./volcano_', gsub('log2FC', '', colnames(data)[2*i-1]), '.pdf'))
  volcano <- EnhancedVolcano(data,
                  lab = rownames(data),
                  title = gsub('log2FC_', '', colnames(data)[2*i-1]),
                  x = colnames(data)[2*i-1],
                  y = colnames(data)[2*i],
                  ylab = bquote(~-Log[10]~adjusted~italic(P))
                  xlim = c(-2, 2),
                  pCutoff = 0.05,
                  FCcutoff = 0.5,
                  transcriptLabSize = 5,
                  drawConnectors = TRUE,
                  widthConnectors = 0.2,
                  legendPosition = 'right')
R plotting • 164 views
ADD COMMENTlink modified 4 months ago by Kevin Blighe54k • written 4 months ago by micecanfly0
gravatar for Kevin Blighe
4 months ago by
Kevin Blighe54k
Kevin Blighe54k wrote:

Hey, there is an example in the vignette: 4.10 Over-ride colouring scheme with custom key-value pairs.



ADD COMMENTlink written 4 months ago by Kevin Blighe54k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1435 users visited in the last hour