[R] Invoking par(mfrow...) on an already subdivided plot
ligges at statistik.tu-dortmund.de
Sun Oct 18 22:09:50 CEST 2009
Maxwell Reback wrote:
> I'd like to generate on a single device multiple plots, each of which
> contains two plots. Essentially, I've got sub-plots which consist of
> two tracks, the upper one displaying gene expression data, and the
> lower one mapping position. I'd like to display four of these
> two-track sub-plots on one device, but I can't seem to invoke the
> par(mfrow=...) or layout(matrix(...)) functions at more than one
> I've got something like:
> par(fig=c(0,1,0.3,1)) #expression: track 1
> par(fig=c(0,1,0,0.4),new=TRUE) #position: track 2
> tapply(gene,gene, plot.gene)
> The par(mfrow=) in plot.multigene, even when 'new=TRUE', is
> disregarded and I just get one sub-plot per page. Suggestions?
You are right. You can use grid or other packages in order to use
recursive kinds of subdivisions.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help