forked from 10XGenomics/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CombinePlots.Rd
44 lines (40 loc) · 992 Bytes
/
CombinePlots.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{CombinePlots}
\alias{CombinePlots}
\title{Combine ggplot2-based plots into a single plot}
\usage{
CombinePlots(plots, ncol = NULL, legend = NULL, ...)
}
\arguments{
\item{plots}{A list of gg objects}
\item{ncol}{Number of columns}
\item{legend}{Combine legends into a single legend
choose from 'right' or 'bottom'; pass 'none' to remove legends, or \code{NULL}
to leave legends as they are}
\item{...}{Extra parameters passed to plot_grid}
}
\value{
A combined plot
}
\description{
Combine ggplot2-based plots into a single plot
}
\examples{
pbmc_small[['group']] <- sample(
x = c('g1', 'g2'),
size = ncol(x = pbmc_small),
replace = TRUE
)
plots <- FeaturePlot(
object = pbmc_small,
features = c('MS4A1', 'FCN1'),
split.by = 'group',
combine = FALSE
)
CombinePlots(
plots = plots,
legend = 'none',
nrow = length(x = unique(x = pbmc_small[['group', drop = TRUE]]))
)
}