Hi R-Users,

I posted this question a while ago on the bioconductor mailing list but got no 
answers. Maybe here is somebody who might know a solution:

I failed at drawing multiple filters in a densityplot() using the 
FlowCore/FlowViz packages.
I
 found a way to draw multiple filters in xyplot(), using the glpolygon 
method within the panel-function, but some similar attempts for 
densityplot failed.
I could draw simply some vertical lines using 
panel.abline, but this doesn't look as appealing as the original method 
when using a single filter with the standard filter=xyz argument.
I 
bet there is a method to draw multiple gates through the panel-function,
 as curv1filter can also identify multiple peaks automatically and 
draw them into a densityplot...


This script works for  xyplot but not for densitylot:

    library(flowCore)
    library(flowViz)


    data(GvHD)
    Filter1        <-    rectangleGate(filterId="Filter1", "FSC-H" = c(0, 200))
    Filter2        <-    rectangleGate(filterId="Filter1", "FSC-H" = c(300, 
400))


    xyplot( `SSC-H` ~ `FSC-H` , data=GvHD[[1]],
        panel = function(...) { 
            panel.xyplot.flowset(...)
           glpolygon( Filter1 )
           glpolygon( Filter2 )
        }
    )
    

    densityplot( ~ `FSC-H`, data=GvHD[[1]],
        panel = function(...) { 
            panel.densityplot.flowset(...)
            glpolygon( Filter1 )
            glpolygon( Filter2 )
        }
    )

The glpolygon method yields not the "typical" look of the densityplot filters, 
but red lined gate boundaries. The desired look of the filter is a lighter 
color and dotted lines as limits.
Thank you in advance!

All the best,
Michael


--
Michael Jahn
PhD student
Helmholtz-Centre for Environmental Research
Leipzig, Germany
http://www.ufz.de(http://www.ufz.de/)


(http://www.ufz.de/)

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to