Closed mikejiang closed 6 years ago
You can simply create plots through loop and arrange them by grid.arrange
(make sure convert the ggcyto
object to ggplot
through coerce function as.ggplot
), Here is the example
dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
fr <- getData(gs[[1]], "CD3+")
markers <- markernames(fr)
x <- markers[1]
objs <- lapply(markers[-1], function(y){
p <- autoplot(fr, x, y)
p <- p + labs_cyto("marker")
p <- p + theme(legend.position="none", strip.background = element_blank(),strip.text.x = element_blank())
as.ggplot(p)
})
gridExtra::grid.arrange(grobs = objs)
On 10/12/2017 12:48 AM, Dillon Hammill wrote: