Question: Enhanced volcano: how to control the size, and to plot multiple volcanos to one PDF page?
gravatar for micecanfly
13 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 • 684 views
ADD COMMENTlink modified 13 months ago by Kevin Blighe66k • written 13 months ago by micecanfly0
gravatar for Kevin Blighe
13 months ago by
Kevin Blighe66k
Kevin Blighe66k wrote:

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



ADD COMMENTlink written 13 months ago by Kevin Blighe66k
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: 1687 users visited in the last hour