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

Aric Gregson aorchid at mac.com
Tue Apr 14 02:30:44 CEST 2009

On Mon, 13 Apr 2009 17:09:55 -0700
Florian Hahne <fhahne at fhcrc.org> wrote:

> I don't quite follow why you have to draw the plot twice to get the
> gate outline. This works on my installation:
> library(flowViz)
> data(GvHD)
> tmp <- GvHD[[1]]
> rg <- rectangleGate("FSC-H"=c(100, 200), "SSC-H"=c(400, 800))
> xyplot(`SSC-H`~`FSC-H`, tmp, smooth=FALSE, filter=rg, outline=T)

Perhaps this has been fixed in 1.7.11? Maybe something else is not
working properly on my installation (quite possible). In previous
discussions you had mentioned there were some bugs in the drawing of
xyplot, so I did not mention this and assumed it was one that you were
aware of. It has been extremely reproducible on my machine for many

> I am also not sure why you want to place individual plots manually. 
> xyplot knows how to deal with flowSets, so the following works fine:
> xyplot(`SSC-H`~`FSC-H`, GvHD[1:3], smooth=FALSE, filter=rg, outline=T)
> and if you want to pass in separate filter objects for each frame you 
> can do so by means of a list.

I'm certain there is a better way, but the above is not what I am
intending to accomplish. I'd like to plot the same flowFrame from a
flowSet, but with different plots. That is, I'd like to show the gating
strategy of the flowSet using one flowFrame as an example. I have not
figured out how lattice can do that without making individual plots and
then laying them all on a page. 

For example, I have the following plots for flowSet[[6]]:
1. FSC.A vs. FSC.H (filterobject1) 
2. APC.H7 vs. Violet UV (filterobject2)
3. APC.H7 vs. AmCyan (filterobject3)
4. SSC.A vs. FSC.A (filterobject4)
5. PacBlue vs. Alexa467 (filterobject5)
6. densityplot of entire flowSet (filterobject6)

Deepayan Sarkar's book is truly invaluable, but I find it abstract on
some points. This is purely my fault as I am not intimately familiar
with lattice, yet. The grid method I used was easiest for me to
implement and familiar from the ggplot2 methods. I will have another
look at the split method.

Thanks for any further suggestions.


> sessionInfo()
R version 2.8.0 (2008-10-20) 


attached base packages:
 [1] splines   grid      tools     stats     graphics  grDevices
utils [8] datasets  methods   base     

other attached packages:
 [1] MASS_7.2-44        RColorBrewer_1.0-2 proto_0.3-8 [5]
reshape_0.8.2      plyr_0.1.1 xtable_1.5-4       flowViz_1.7.10 [9]
lattice_0.17-20 flowCore_1.9.18    rrcov_0.4-07       robustbase_0.4-3
[13] Biobase_2.2.1     

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.4.1 DBI_0.2-4           KernSmooth_2.22-22 
 [4] RSQLite_0.7-1       cluster_1.11.11     feature_1.1-14     
 [7] geneplotter_1.20.0  graph_1.20.0        latticeExtra_0.5-4 
[10] stats4_2.8.0

More information about the Bioconductor mailing list