[BioC] Limma: 2 venn diagrams on single page
James W. MacDonald
jmacdon at med.umich.edu
Mon Mar 23 17:27:23 CET 2009
I would use a combination of layout() and the width and height arguments
to pdf().
If I run the workable portion of your code, I get pretty reasonable
results with this:
> pdf("test.pdf", paper="a4", height=11, width=7)
> layout(matrix(1:2, ncol=1))
> vennDiagram(a)
> vennDiagram(a)
> dev.off()
Best,
Jim
Daren Tan wrote:
> I would like to place 2 venn diagrams generated by limma on single
> page. However they are very squeezy and there are much empty space
> above and below them. The output is attached to this post. I would
> like to remove the empty space, so that the venn diagrams are as large
> as possible while retaining their aspect ratio. I tried reducing oma
> to 0 but unable to get what I want.
>
> library("limma")
> Y <- matrix(rnorm(100*6),100,6)
> Y[1:10,3:4] <- Y[1:10,3:4]+3
> Y[1:20,5:6] <- Y[1:20,5:6]+3
> design <- cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1))
> fit <- eBayes(lmFit(Y,design))
> results <- decideTests(fit)
> a <- vennCounts(results)
> pdf("test.pdf", paper="a4")
> par(oma=rep(0.5, 4), mfrow=c(2,1), pty="m")
> vennDiagram(m, include=c("up","down"), counts.col=c("red","green"),
> mar=rep(1,4), main="test")
> vennDiagram(m, include=c("both"), counts.col=c("blue"), mar=rep(1,4),
> main="test")
> dev.off()
>
>> sessionInfo()
> R version 2.8.1 (2008-12-22)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> States.1252;LC_MONETARY=English_United
> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>
> attached base packages:
> [1] tools stats graphics grDevices utils datasets
> methods base
>
> other attached packages:
> [1] limma_2.16.4 venn_1.6 pvclust_1.2-1
> org.Hs.eg.db_2.2.6 KEGG.db_2.2.5 hgu133a.db_2.2.5
> RSQLite_0.7-1
> [8] DBI_0.2-4 AnnotationDbi_1.4.3 Biobase_2.2.2
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
More information about the Bioconductor
mailing list