openCyto displaying gating panels
1
0
Entering edit mode
Rivka • 0
@rivka-11959
Last seen 7.4 years ago
Munich

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

opencyto • 1.3k views
ADD COMMENT
2
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.1 years ago
(Private Address)

"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 COMMENT

Login before adding your answer.

Traffic: 1097 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6