Search
Question: openCyto displaying gating panels
0
gravatar for Rivka
10 months ago by
Rivka0
Munich
Rivka0 wrote:

Hello,

when displaying my gating panels with plotGate(gh), I get all panels in one window, as I like it. 

I now need to customize the axises for some of the panels separately but cannot find a function to still have all panels showing in one window in a 4*4 arrangement. The following shows them in 3 separated windows. 

plotGate(gh,c("Lymphocytes"), xlim =  c(-2e6, 1e7) , ylim = c(995e0, 1001e0))
plotGate(gh,c("Single Cells"),xlim = c(5e4, 4e5), ylim = c(1e2, 25e1) )
plotGate(gh,c("CD3"), xlim = c(5e4, 4e5), ylim = c(0,3e2) )

I would like these 3 and another four gates A, B, C, D in one window. 

Can anybody please give me an idea?

Thanks, Rivka

ADD COMMENTlink modified 10 months ago by Jiang, Mike1.0k • written 10 months ago by Rivka0
2
gravatar for Jiang, Mike
10 months ago by
Jiang, Mike1.0k
(Private Address)
Jiang, Mike1.0k wrote:

"plotGate " method for "GatingHierarchy" object (i.e. 'gh' in your case) is implemented by using "gridExtra::grid.arrange" to put multiple plots on the same page. If you need to customize each individual panel/plot to that extent, you disable default arrange behavior for "plotGate' call so that it will return a "trellis plot" object that can be arranged later on your own. e.g.

p1 <- plotGate(gh,c("Lymphocytes"), xlim =  c(-2e6, 1e7) , ylim = c(995e0, 1001e0), arrange = FALSE)
p2 <- plotGate(gh,c("Single Cells"),xlim = c(5e4, 4e5), ylim = c(1e2, 25e1), arrange = FALSE)
p3 <- plotGate(gh,c("CD3"), xlim = c(5e4, 4e5), ylim = c(0,3e2), arrange = FALSE)

....#the same as your A, B, C, D plots

plotObjs <- c(p1, p2, p3, A, B, C, D)

gridExtra::grid.arrange(grobs = plotObjs, nrow = 4, ncol = 4)
ADD COMMENTlink written 10 months ago by Jiang, Mike1.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 131 users visited in the last hour