[BioC] flowViz Plots Gate Outline and grid.newpage()/viewport Issue

Aric Gregson aorchid at mac.com
Mon Apr 13 22:23:16 CEST 2009


Hello,

I realize that with the version of flowViz I am running (1.7.10) that
if I draw a scatterplot with smooth=F and attempt to draw the gate
outline the first drawing of the plot will not show the outline, but
subsequent attempts will. To generate pdf figures that show the gate
outline, I just draw the plot twice prior to submitting it to the pdf
device and the gate outline is there in the pdf file. 

However, I now am placing multiple figures in the same pdf page as
below and wonder if there is another method to do this. 

Example plot:

plot344lymph<-xyplot(`FSC.A` ~ `SSC.A`, Data(wf[["CD3+"]])[[6]],
xlim=c(0, 8),
ylim=c(0, 120000),
filter=lymphscatfilter,
smooth=F,
alpha=0.6,
pch=21,
cex=0.1,                     
outline=TRUE,
names=TRUE,
#scales=list(tick.number= 10),
main="Lymphocyte Gate\nSinglet Live CD3/CD4+",
xlab="Side Scatter Area",
ylab="Forward Scatter Area",
par.settings=list(gate=list(col="purple", alpha=.4),
   gate.text=list(col="black", alpha=0.7, cex=0.6)))      

Code to generate multiple plots on one pdf page:

pdf(file="grid344.pdf", width=11, height=8.5)
grid.newpage()
pushViewport(viewport(layout = grid.layout(2, 3)))
pushViewport(viewport(layout.pos.col=1, layout.pos.row=1))
print(plot344singlet, newpage = FALSE)
popViewport(1)
#
pushViewport(viewport(layout.pos.col=1, layout.pos.row=1))
print(plot344singlet, newpage = FALSE)
popViewport(1)

pushViewport(viewport(layout.pos.col=2, layout.pos.row=1))
print(plot344live, newpage = FALSE)
popViewport()
#
pushViewport(viewport(layout.pos.col=2, layout.pos.row=1))
print(plot344live, newpage = FALSE)
popViewport()

...etc. for each plot. 

Is there a more elegant and less compute intensive way to do this?

Thanks in advance.

-- 
Aric Gregson



More information about the Bioconductor mailing list